Motion Candidate List Construction For Video Coding

ABSTRACT

A method of video processing includes determining, for a conversion between a current block of a video and a bitstream representation of the video, an operation associated with a list of motion candidates based on a condition related to a characteristic of the current block. The list of motion candidates is constructed for a coding technique or based on information from previously processed blocks of the video. The method also includes performing the conversion based on the determining.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. patentapplication Ser. No. 17/541,092, filed on Dec. 2, 2021, which is acontinuation of International Patent Application No. PCT/CN2020/094865,filed on Jun. 8, 2020, which claims the priority to and benefits ofInternational Patent Application No. PCT/CN2019/090409 filed on Jun. 6,2019, International Patent Application No. PCT/CN2019/092438 filed onJun. 22, 2019, and International Patent Application No.PCT/CN2019/105180 filed on Sep. 10, 2019. All the aforementioned patentapplications are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

This document is related to video and image coding and decodingtechnologies.

BACKGROUND

Digital video accounts for the largest bandwidth use on the internet andother digital communication networks. As the number of connected userdevices capable of receiving and displaying video increases, it isexpected that the bandwidth demand for digital video usage will continueto grow.

SUMMARY

The disclosed techniques may be used by video or image decoder orencoder embodiments to perform coding or decoding of video bitstreamsintra block copy partitioning techniques at the sub-block level.

In one example aspect, a method of video processing is disclosed. Themethod includes determining, for a conversion between a current block ofa video and a bitstream representation of the video, that the currentblock is split into multiple sub-blocks. At least one of the multipleblocks is coded using a modified intra-block copy (IBC) coding techniquethat uses reference samples from one or more video regions from acurrent picture of the current block. The method also includesperforming the conversion based on the determining.

In another example aspect, a method of video processing is disclosed.The method includes determining, for a conversion between a currentblock of a video and a bitstream representation of the video, that thecurrent block is split into multiple sub-blocks. Each of the multiplesub-blocks is coded in the coded representation using a correspondingcoding technique according to a pattern. The method also includesperforming the conversion based on the determining.

In another example aspect, a method of video processing is disclosed.The method includes determining, for a conversion between a currentblock of a video and a bitstream representation of the video, anoperation associated with a list of motion candidates based on acondition related to a characteristic of the current block. The list ofmotion candidates is constructed for a coding technique or based oninformation from previously processed blocks of the video. The methodalso includes performing the conversion based on the determining.

In another example aspect, a method of video processing is disclosed.The method includes determining, for a conversion between a currentblock of a video and a bitstream representation of the video, that thecurrent block coded using an inter coding technique based on temporalinformation is split into multiple sub-blocks. At least one of themultiple blocks is coded using a modified intra-block copy (IBC) codingtechnique that uses reference samples from one or more video regionsfrom a current picture that includes the current block. The method alsoincludes performing the conversion based on the determining.

In another example aspect, a method of video processing is disclosed.The method includes determining to use a sub-block intra block copy(sbIBC) coding mode in a conversion between a current video block in avideo region and a bitstream representation of the current video blockin which the current video block is split into multiple sub-blocks andeach sub-block is coded based on reference samples from the videoregion, wherein sizes of the sub-blocks are based on a splitting ruleand performing the conversion using the sbIBC coding mode for themultiple sub-blocks.

In another example aspect, a method of video processing is disclosed.The method includes determining to use a sub-block intra block copy(sbIBC) coding mode in a conversion between a current video block in avideo region and a bitstream representation of the current video blockin which the current video block is split into multiple sub-blocks andeach sub-block is coded based on reference samples from the video regionand performing the conversion using the sbIBC coding mode for themultiple sub-blocks, wherein the conversion includes determining aninitialized motion vector (initMV) for a given sub-block, identifying areference block from the initMV, and deriving motion vector (MV)information for the given sub-block using MV information for thereference block.

In another example aspect, a method of video processing is disclosed.The method includes determining to use a sub-block intra block copy(sbIBC) coding mode in a conversion between a current video block in avideo region and a bitstream representation of the current video blockin which the current video block is split into multiple sub-blocks andeach sub-block is coded based on reference samples from the video regionand performing the conversion using the sbIBC coding mode for themultiple sub-blocks, wherein the conversion includes generating asub-block IBC candidate.

In another example aspect, a method of video processing is disclosed.The method includes performing a conversion between a bitstreamrepresentation of a current video block and the current video block thatis divided into multiple sub-blocks, wherein the conversion includesprocessing a first sub-block of the multiple sub-blocks using asub-block intra block coding (sbIBC) mode and a second sub-block of themultiple sub-blocks using an intra coding mode.

In another example aspect, a method of video processing is disclosed.The method includes performing a conversion between a bitstreamrepresentation of a current video block and the current video block thatis divided into multiple sub-blocks, wherein the conversion includesprocessing all sub-blocks of the multiple sub-blocks using an intracoding mode.

In another example aspect, a method of video processing is disclosed.The method includes performing a conversion between a bitstreamrepresentation of a current video block and the current video block thatis divided into multiple sub-blocks, wherein the conversion includesprocessing all of the multiple sub-blocks using a palette coding mode inwhich a palette of representative pixel values is used for coding eachsub-block.

In another example aspect, a method of video processing is disclosed.The method includes performing a conversion between a bitstreamrepresentation of a current video block and the current video block thatis divided into multiple sub-blocks, wherein the conversion includesprocessing a first sub-block of the multiple sub-blocks using a palettemode in which a palette of representative pixel values is used forcoding the first sub-block and a second sub-block of the multiplesub-blocks using an intra block copy coding mode.

In another example aspect, a method of video processing is disclosed.The method includes performing a conversion between a bitstreamrepresentation of a current video block and the current video block thatis divided into multiple sub-blocks, wherein the conversion includesprocessing a first sub-block of the multiple sub-blocks using a palettemode in which a palette of representative pixel values is used forcoding the first sub-block and a second sub-block of the multiplesub-blocks using an intra coding mode.

In another example aspect, a method of video processing is disclosed.The method includes performing a conversion between a bitstreamrepresentation of a current video block and the current video block thatis divided into multiple sub-blocks, wherein the conversion includesprocessing a first sub-block of the multiple sub-blocks using asub-block intra block coding (sbIBC) mode and a second sub-block of themultiple sub-blocks using an inter coding mode.

In another example aspect, a method of video processing is disclosed.The method includes performing a conversion between a bitstreamrepresentation of a current video block and the current video block thatis divided into multiple sub-blocks, wherein the conversion includesprocessing a first sub-block of the multiple sub-blocks using asub-block intra coding mode and a second sub-block of the multiplesub-blocks using an inter coding mode.

In another example aspect, a method of video processing is disclosed.The method includes making a decision to use the method recited in anyof above claims for encoding the current video block into the bitstreamrepresentation; and including information indicative of the decision inthe bitstream representation at a decoder parameter set level or asequence parameter set level or a video parameter set level or a pictureparameter set level or a picture header level or a slice header level ora tile group header level or a largest coding unit level or a codingunit level or a largest coding unit row level or a group of Largestcoding unit (LCU) level or a transform unit level or a prediction unitlevel or a video coding unit level.

In another example aspect, a method of video processing is disclosed.The method includes making a decision to use the method recited in anyof the above claims for encoding the current video block into thebitstream representation based on an encoding condition; and performingthe encoding using the method recited in any of the above claims,wherein the condition is based on one or more of: a position of codingunit, prediction unit, transform unit, the current video block or avideo coding unit of the current video block.

In another example aspect, a method of video processing is disclosed.The method includes determining to use an intra block copy mode and aninter prediction mode for conversion between blocks in a video regionand a bitstream representation of the video region; and performing theconversion using the intra block copy mode and the inter prediction modefor a block in the video region.

In another example aspect, a method of video processing is disclosed.The method includes performing, during a conversion between a currentvideo block and a bitstream representation of the current video block, amotion candidate list construction process depending and/or a tableupdate process for updating history-based motion vector predictortables, based on a coding condition, and performing the conversion basedon the motion candidate list construction process and/or the tableupdate process.

In another example aspect, the above-described methods may beimplemented by a video decoder apparatus that comprises a processor.

In another example aspect, the above-described methods may beimplemented by a video encoder apparatus that comprises a processor.

In yet another example aspect, these methods may be embodied in the formof processor-executable instructions and stored on a computer-readableprogram medium.

These, and other, aspects are further described in the present document.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a derivation process for merge candidate list construction.

FIG. 2 shows an example of positions of spatial merge candidates.

FIG. 3 shows an example of candidate pairs considered for redundancycheck of spatial merge candidates.

FIG. 4 shows an example positions for the second prediction unit (PU) ofN×2N and 2N×N partitions.

FIG. 5 shows examples of illustration of motion vector scaling fortemporal merge candidate.

FIG. 6 shows an example of candidate positions for temporal mergecandidate, C0 and C1.

FIG. 7 shows example of combined bi-predictive merge candidate.

FIG. 8 shows examples of derivation process for motion vector predictioncandidates.

FIG. 9 shows an example illustration of motion vector scaling forspatial motion vector candidate.

FIG. 10 shows an example simplified affine motion model for 4-parameteraffine mode (left) and 6-parameter affine model (right).

FIG. 11 shows an example of affine motion vector field per sub-block.

FIG. 12 shows an example Candidates position for affine merge mode.

FIG. 13 shows an example of Modified merge list construction process.

FIG. 14 shows an example of triangle partition based inter prediction.

FIG. 15 shows an example of a coding unit (CU) applying the 1stweighting factor group.

FIG. 16 shows an example of motion vector storage.

FIG. 17 shows an example of ultimate motion vector expression (UMVE)search process.

FIG. 18 shows an example of UMVE search points.

FIG. 19 shows an example of motion vector difference (MVD) (0, 1)mirrored between list 0 and list 1 in Decoder-side Motion VectorRefinement (DMVR).

FIG. 20 shows MVs that may be checked in one iteration.

FIG. 21 is an example of intra block copy.

FIG. 22 is a block diagram of an example of a video processingapparatus.

FIG. 23 is a flowchart for an example of a video processing method.

FIG. 24 is a block diagram of an example video processing system inwhich disclosed techniques may be implemented.

FIG. 25 is a flowchart representation of a method for video processingin accordance with the present technology.

FIG. 26 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 27 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 28 is a flowchart representation of yet another method for videoprocessing in accordance with the present technology.

DETAILED DESCRIPTION

The present document provides various techniques that can be used by adecoder of image or video bitstreams to improve the quality ofdecompressed or decoded digital video or images. For brevity, the term“video” is used herein to include both a sequence of pictures(traditionally called video) and individual images. Furthermore, a videoencoder may also implement these techniques during the process ofencoding in order to reconstruct decoded frames used for furtherencoding.

Section headings are used in the present document for ease ofunderstanding and do not limit the embodiments and techniques to thecorresponding sections. As such, embodiments from one section can becombined with embodiments from other sections.

1. Summary

This document is related to video coding technologies. Specifically, itis related to intra block copy (a.k.a current picture referencing (CPR))coding. It may be applied to the existing video coding standard likeHigh Efficiency Video Coding (HEVC), or the standard (Versatile VideoCoding) to be finalized. It may be also applicable to future videocoding standards or video codec.

2. Background

Video coding standards have evolved primarily through the development ofthe well-known International Telecommunication Union-TelecommunicationStandardization Sector (ITU-T) and International Organization forStandardization (ISO)/International Electrotechnical Commission (IEC)standards. The ITU-T produced H.261 and H.263, ISO/IEC produced MovingPicture Experts Group (MPEG)-1 and MPEG-4 Visual, and the twoorganizations jointly produced the H.262/MPEG-2 Video and H.264/MPEG-4Advanced Video Coding (AVC) and H.265/High Efficiency Video Coding(HEVC) standards. Since H.262, the video coding standards are based onthe hybrid video coding structure wherein temporal prediction plustransform coding are utilized. To explore the future video codingtechnologies beyond HEVC, Joint Video Exploration Team (JVET) wasfounded by Video Coding Experts Group (VCEG) and MPEG jointly in 2015.Since then, many new methods have been adopted by JVET and put into thereference software named Joint Exploration Model (JEM) In April 2018,the Joint Video Expert Team (JVET) between VCEG (Q6/16) and ISO/IECjoint technical committee (JTC)1 SC29/WG11, MPEG,was created to work onthe Versatile Video Coding (VVC) standard targeting at 50% bitratereduction compared to HEVC.

2.1 Inter Prediction in HEVC/H.265

For inter-coded coding units (CUs), it may be coded with one predictionunit (PU), 2 PUs according to partition mode. Each inter-predicted PUhas motion parameters for one or two reference picture lists. Motionparameters include a motion vector and a reference picture index. Usageof one of the two reference picture lists may also be signaled usinginter_pred_idc. Motion vectors may be explicitly coded as deltasrelative to predictors.

When a CU is coded with skip mode, one PU is associated with the CU, andthere are no significant residual coefficients, no coded motion vectordelta or reference picture index. A merge mode is specified whereby themotion parameters for the current PU are obtained from neighbouring PUs,including spatial and temporal candidates. The merge mode can be appliedto any inter-predicted PU, not only for skip mode. The alternative tomerge mode is the explicit transmission of motion parameters, wheremotion vector (to be more precise, motion vector differences (MVD)compared to a motion vector predictor), corresponding reference pictureindex for each reference picture list and reference picture list usageare signaled explicitly per each PU. Such a mode is named Advancedmotion vector prediction (AMVP) in this disclosure.

When signaling indicates that one of the two reference picture lists isto be used, the PU is produced from one block of samples. This isreferred to as ‘uni-prediction’. Uni-prediction is available both forP-slices and B-slices.

When signaling indicates that both of the reference picture lists are tobe used, the PU is produced from two blocks of samples. This is referredto as ‘bi-prediction’. Bi-prediction is available for B-slices only.

2.1.1 Reference Picture List

In HEVC, the term inter prediction is used to denote prediction derivedfrom data elements (e.g., sample values or motion vectors) of referencepictures other than the current decoded picture. Like in H.264/AVC, apicture can be predicted from multiple reference pictures. The referencepictures that are used for inter prediction are organized in one or morereference picture lists. The reference index identifies which of thereference pictures in the list should be used for creating theprediction signal.

A single reference picture list, List 0, is used for a P slice and tworeference picture lists, List 0 and List 1 are used for B slices. Itshould be noted reference pictures included in List 0/1 can be from pastand future pictures in terms of capturing/display order.

2.1.2 Merge Mode

2.1.2.1 Derivation of Candidates for Merge Mode

When a PU is predicted using merge mode, an index pointing to an entryin the merge candidates list is parsed from the bitstream and used toretrieve the motion information. The construction of this list isspecified in the HEVC standard and can be summarized according to thefollowing sequence of steps:

Step 1: Initial candidates derivation

-   -   Step 1.1: Spatial candidates derivation    -   Step 1.2: Redundancy check for spatial candidates    -   Step 1.3: Temporal candidates derivation

Step 2: Additional candidates insertion

-   -   Step 2.1: Creation of bi-predictive candidates    -   Step 2.2: Insertion of zero motion candidates

These steps are also schematically depicted in FIG. 1 . For spatialmerge candidate derivation, a maximum of four merge candidates areselected among candidates that are located in five different positions.For temporal merge candidate derivation, a maximum of one mergecandidate is selected among two candidates. Since constant number ofcandidates for each PU is assumed at decoder, additional candidates aregenerated when the number of candidates obtained from step 1 does notreach the maximum number of merge candidate (MaxNumMergeCand) which issignalled in slice header. Since the number of candidates is constant,index of best merge candidate is encoded using truncated unarybinarization (TU). If the size of CU is equal to 8, all the PUs of thecurrent CU share a single merge candidate list, which is identical tothe merge candidate list of the 2N×2N prediction unit.

In the following, the operations associated with the aforementionedsteps are detailed.

2.1.2.2 Spatial candidates derivation

In the derivation of spatial merge candidates, a maximum of four mergecandidates are selected among candidates located in the positionsdepicted in FIG. 2 . The order of derivation is A₁, B₁, B₀, A₀ and B₂.Position B₂ is considered only when any PU of position A₁, B₁, B₀, A₀ isnot available (e.g. because it belongs to another slice or tile) or isintra coded. After candidate at position A₁ is added, the addition ofthe remaining candidates is subject to a redundancy check which ensuresthat candidates with same motion information are excluded from the listso that coding efficiency is improved. To reduce computationalcomplexity, not all possible candidate pairs are considered in thementioned redundancy check. Instead only the pairs linked with an arrowin FIG. 3 are considered and a candidate is only added to the list ifthe corresponding candidate used for redundancy check has not the samemotion information. Another source of duplicate motion information isthe “second PU” associated with partitions different from 2N×2N. As anexample, FIG. 4 depicts the second PU for the case of N×2N and 2N×N,respectively. When the current PU is partitioned as N×2N, candidate atposition A₁ is not considered for list construction. In fact, by addingthis candidate will lead to two prediction units having the same motioninformation, which is redundant to just have one PU in a coding unit.Similarly, position B₁ is not considered when the current PU ispartitioned as 2N×N.

2.1.2.3 Temporal Candidates Derivation

In this step, only one candidate is added to the list. Particularly, inthe derivation of this temporal merge candidate, a scaled motion vectoris derived based on co-located PU in a co-located picture. The scaledmotion vector for temporal merge candidate is obtained as illustrated bythe dotted line in FIG. 5 , which is scaled from the motion vector ofthe co-located PU using the POC distances, tb and td, where tb isdefined to be the POC difference between the reference picture of thecurrent picture and the current picture and td is defined to be the POCdifference between the reference picture of the co-located picture andthe co-located picture. The reference picture index of temporal mergecandidate is set equal to zero. A practical realization of the scalingprocess is described in the HEVC specification. For a B-slice, twomotion vectors, one is for reference picture list 0 and the other is forreference picture list 1, are obtained and combined to make thebi-predictive merge candidate.

2.1.2.4 Co-Located Picture and Co-Located PU

When temporal motion vector prediction (TMVP) is enabled (e.g.,slice_temporal_mvp_enabled_flag is equal to 1), the variable ColPicrepresenting the col-located picture is derived as follows:

-   -   If current slice is B slice and the signalled        collocated_from_l0_flag is equal to 0, ColPic is set equal to        RefPicList1[collocated_ref_idx].    -   Otherwise (slice type is equal to B and collocated_from_l0_flag        is equal to 1, or slice_type is equal to P), ColPic is set equal        to RefPicList0[collocated_ref_idx].

Here collocated_ref_idx and collocated_from_l0_flag are two syntaxelements which may be signalled in slice header.

In the co-located PU (Y) belonging to the reference frame, the positionfor the temporal candidate is selected between candidates C₀ and C₁, asdepicted in FIG. 6 . If PU at position C₀ is not available, is intracoded, or is outside of the current coding tree unit (CTU aka. LCU,largest coding unit) row, position C₁ is used. Otherwise, position C₀ isused in the derivation of the temporal merge candidate.

Related syntax elements are described as follows:

7.3.6.1 General Slice Segment Header Syntax

Descriptor slice_segment_header( ) {  first_slice_segment_in_pic_flagu(1) ...   if( slice_type = = P | | slice_type = = B ) {   num_ref_idx_active_override_flag u(1)    if(num_ref_idx_active_override_flag ) {     num_ref_idx_l0_active_minus1ue(v)     if( slice_type = = B )      num_ref_idx_l1_active_minus1 ue(v)   } ...    if( slice_temporal_mvp_enabled_flag ) {    if( slice_type = = B )       collocated_from_l0_flag u(1)    if( ( collocated_from_l0_flag && num_ref_idx_l0_active_minus1 > 0 ) | |     ( !collocated_from_l0_flag && num_ref_idx_l1_active_minus1 > 0 ) )      collocated_ref_idx ue(v)    } ...  byte_alignment( ) }

2.1.2.5 Derivation of MVs for the TMVP Candidate

More specifically, the following steps are performed in order to derivethe TMVP candidate:

(1) set reference picture list X=0, target reference picture to be thereference picture with index equal to 0 (e.g., curr_ref) in list X.Invoke the derivation process for collocated motion vectors to get theMV for list X pointing to curr_ref

(2) if current slice is B slice, set reference picture list X=1, targetreference picture to be the reference picture with index equal to 0(e.g., curr_ref) in list X. Invoke the derivation process for collocatedmotion vectors to get the MV for list X pointing to curr_ref.

The derivation process for collocated motion vectors is described in thenext sub-section.

2.1.2.5.1 Derivation Process for Collocated Motion Vectors

For the co-located block, it may be intra or inter coded withuni-prediction or bi-prediction. If it is intra coded, TMVP candidate isset to be unavailable.

If it is uni-prediction from list A, the motion vector of list A isscaled to the target reference picture list X.

If it is bi-prediction and the target reference picture list is X, themotion vector of list A is scaled to the target reference picture listX, and A is determined according to the following rules:

-   -   If none of reference pictures has a greater POC values compared        to current picture, A is set equal to X.    -   Otherwise, A is set equal to collocated_from_l0_flag.

Some related descriptions are included as follows:

8.5.3.2.9 Derivation Process for Collocated Motion Vectors

Inputs to this process are:

-   -   a variable currPb specifying the current prediction block,    -   a variable colPb specifying the collocated prediction block        inside the collocated picture specified by ColPic,    -   a luma location (xColPb, yColPb) specifying the top-left sample        of the collocated luma prediction block specified by colPb        relative to the top-left luma sample of the collocated picture        specified by ColPic,    -   a reference index refIdxLX, with X being 0 or 1.

Outputs of this process are:

-   -   the motion vector prediction mvLXCol,    -   the availability flag availableFlagLXCol.

The variable currPic specifies the current picture.

The arrays predFlagL0Col[x][y], mvL0Col[x][y], and refIdxL0Col[x][y] areset equal to PredFlagL0[x][y], MvL0[x][y], and RefIdxL0[x][y],respectively, of the collocated picture specified by ColPic, and thearrays predFlagL1Col[x][y], mvL1Col[x][y], and refIdxL1Col[x][y] are setequal to PredFlagL1[x][y], MvL1[x][y], and RefIdxL1[x][y], respectively,of the collocated picture specified by ColPic.

The variables mvLXCol and availableFlagLXCol are derived as follows:

-   -   If colPb is coded in an intra prediction mode, both components        of mvLXCol are set equal to 0 and availableFlagLXCol is set        equal to 0.    -   Otherwise, the motion vector mvCol, the reference index        refIdxCol, and the reference list identifier listCol are derived        as follows:        -   If predFlagL0Col[xColPb][yColPb] is equal to 0, mvCol,            refIdxCol, and listCol are set equal to            mvL1Col[xColPb][yColPb], refIdxL1Col[xColPb][yColPb], and            L1, respectively.        -   Otherwise, if predFlagL0Col[xColPb][yColPb] is equal to 1            and predFlagL1Col[xColPb][yColPb] is equal to 0, mvCol,            refIdxCol, and listCol are set equal to            mvL0Col[xColPb][yColPb], refIdxL0Col[xColPb][yColPb], and            L0, respectively.        -   Otherwise (predFlagL0Col[xColPb][yColPb] is equal to 1 and            predFlagL1Col[xColPb][yColPb] is equal to 1), the following            assignments are made:            -   If NoBackwardPredFlag is equal to 1, mvCol, refIdxCol,                and listCol are set equal to mvLXCol[xColPb][yColPb],                refIdxLXCol[xColPb][yColPb], and LX, respectively.            -   Otherwise, mvCol, refIdxCol, and listCol are set equal                to mvLNCol[xColPb][yColPb], refIdxLNCol[xColPb][yColPb],                and LN, respectively, with N being the value of                collocated_from_l0_flag.    -   and mvLXCol and availableFlagLXCol are derived as follows:        -   If LongTermRefPic(currPic, currPb, refIdxLX, LX) is not            equal to LongTermRefPic(ColPic, colPb, refIdxCol, listCol),            both components of mvLXCol are set equal to 0 and            availableFlagLXCol is set equal to 0.        -   Otherwise, the variable availableFlagLXCol is set equal to            1, refPicListCol[refIdxCol] is set to be the picture with            reference index refIdxCol in the reference picture list            listCol of the slice containing prediction block colPb in            the collocated picture specified by ColPic, and the            following applies:

colPocDiff=DiffPicOrderCnt(ColPic, refPicListCol[refIdxCol])   (2-1)

currPocDiff=DiffPicOrderCnt(currPic, RefPicListX[refIdxLX])   (2-2)

-   -   -   -   If RefPicListX[refIdxLX] is a long-term reference                picture, or colPocDiff is equal to currPocDiff, mvLXCol                is derived as follows:

mvLXCol=mvCol   (2-3)

-   -   -   -   Otherwise, mvLXCol is derived as a scaled version of the                motion vector mvCol as follows:

tx=(16384+(Abs(td)>>1))/td   (2-4)

distScaleFactor=Clip3(−4096, 4095, (tb*tx+32)>>6)   (2-5)

mvLXCol=Clip3(−32768, 32767,Sign(distScaleFactor*mvCol)*((Abs(distScaleFactor*mvCol)+127)>>8))  (2-6)

-   -   -   -   where td and tb are derived as follows:

td=Clip3(−128, 127, colPocDiff)   (2-7)

tb=Clip3(−128, 127, currPocDiff)   (2-8)

Definition of NoBackwardPredFlag is:

The variable NoBackwardPredFlag is derived as follows:

-   -   If DiffPicOrderCnt(aPic, CurrPic) is less than or equal to 0 for        each picture aPic in RefPicList0 or RefPicList1 of the current        slice, NoBackwardPredFlag is set equal to 1.    -   Otherwise, NoBackwardPredFlag is set equal to 0.

2.1.2.6 Additional Candidates Insertion

Besides spatial and temporal merge candidates, there are two additionaltypes of merge candidates: combined bi-predictive merge candidate andzero merge candidate. Combined bi-predictive merge candidates aregenerated by utilizing spatial and temporal merge candidates. Combinedbi-predictive merge candidate is used for B-Slice only. The combinedbi-predictive candidates are generated by combining the first referencepicture list motion parameters of an initial candidate with the secondreference picture list motion parameters of another. If these two tuplesprovide different motion hypotheses, they will form a new bi-predictivecandidate. As an example, FIG. 7 depicts the case when two candidates inthe original list (on the left), which have mvL0 and refIdxL0 or mvL1and refIdxL1, are used to create a combined bi-predictive mergecandidate added to the final list (on the right). There are numerousrules regarding the combinations which are considered to generate theseadditional merge candidates.

Zero motion candidates are inserted to fill the remaining entries in themerge candidates list and therefore hit the MaxNumMergeCand capacity.These candidates have zero spatial displacement and a reference pictureindex which starts from zero and increases every time a new zero motioncandidate is added to the list. Finally, no redundancy check isperformed on these candidates.

2.1.3 AMVP

AMVP exploits spatial-temporal correlation of motion vector withneighbouring PUs, which is used for explicit transmission of motionparameters. For each reference picture list, a motion vector candidatelist is constructed by firstly checking availability of left, abovetemporally neighbouring PU positions, removing redundant candidates andadding zero vector to make the candidate list to be constant length.Then, the encoder can select the best predictor from the candidate listand transmit the corresponding index indicating the chosen candidate.Similarly with merge index signaling, the index of the best motionvector candidate is encoded using truncated unary. The maximum value tobe encoded in this case is 2 (see FIG. 8 ). In the following sections,details about derivation process of motion vector prediction candidateare provided.

2.1.3.1 Derivation of AMVP Candidates

FIG. 8 summarizes derivation process for motion vector predictioncandidate.

In motion vector prediction, two types of motion vector candidates areconsidered: spatial motion vector candidate and temporal motion vectorcandidate. For spatial motion vector candidate derivation, two motionvector candidates are eventually derived based on motion vectors of eachPU located in five different positions as depicted in FIG. 2 .

For temporal motion vector candidate derivation, one motion vectorcandidate is selected from two candidates, which are derived based ontwo different co-located positions. After the first list ofspatio-temporal candidates is made, duplicated motion vector candidatesin the list are removed. If the number of potential candidates is largerthan two, motion vector candidates whose reference picture index withinthe associated reference picture list is larger than 1 are removed fromthe list. If the number of spatio-temporal motion vector candidates issmaller than two, additional zero motion vector candidates is added tothe list.

2.1.3.2 Spatial Motion Vector Candidates

In the derivation of spatial motion vector candidates, a maximum of twocandidates are considered among five potential candidates, which arederived from PUs located in positions as depicted in FIG. 2 , thosepositions being the same as those of motion merge. The order ofderivation for the left side of the current PU is defined as A₀, A₁, andscaled A₀, scaled A₁. The order of derivation for the above side of thecurrent PU is defined as B₀, B₁, B₂, scaled B₀, scaled B₁, scaled B₂.For each side there are therefore four cases that can be used as motionvector candidate, with two cases not required to use spatial scaling,and two cases where spatial scaling is used. The four different casesare summarized as follows.

No spatial scaling

(1) Same reference picture list, and same reference picture index (samePOC)

(2) Different reference picture list, but same reference picture (samePOC)

Spatial scaling

(3) Same reference picture list, but different reference picture(different POC)

(4) Different reference picture list, and different reference picture(different POC)

The no-spatial-scaling cases are checked first followed by the spatialscaling. Spatial scaling is considered when the POC is different betweenthe reference picture of the neighbouring PU and that of the current PUregardless of reference picture list. If all PUs of left candidates arenot available or are intra coded, scaling for the above motion vector isallowed to help parallel derivation of left and above MV candidates.Otherwise, spatial scaling is not allowed for the above motion vector.

In a spatial scaling process, the motion vector of the neighbouring PUis scaled in a similar manner as for temporal scaling, as depicted asFIG. 9 . The main difference is that the reference picture list andindex of current PU is given as input; the actual scaling process is thesame as that of temporal scaling.

2.1.3.3 Temporal Motion Vector Candidates

Apart for the reference picture index derivation, all processes for thederivation of temporal merge candidates are the same as for thederivation of spatial motion vector candidates (see FIG. 6 ). Thereference picture index is signalled to the decoder.

2.2 Inter Prediction Methods in VVC

There are several new coding tools for inter prediction improvement,such as Adaptive Motion Vector difference Resolution (AMVR) forsignaling MVD, Merge with Motion Vector Differences (MMVD), Triangularprediction mode (TPM), Combined intra-inter prediction (CIIP), AdvancedTMVP (ATMVP, aka SbTMVP), affine prediction mode, GeneralizedBi-Prediction (GBI), Decoder-side Motion Vector Refinement (DMVR) andBi-directional Optical flow (BIO, a.k.a BDOF).

There are three different merge list construction processes supported inVVC:

(1) Sub-block merge candidate list: it includes ATMVP and affine mergecandidates. One merge list construction process is shared for bothaffine modes and ATMVP mode. Here, the ATMVP and affine merge candidatesmay be added in order. Sub-block merge list size is signaled in sliceheader, and maximum value is 5.

(2) Regular merge list: For inter-coded blocks, one merge listconstruction process is shared. Here, the spatial/temporal mergecandidates, HMVP, pairwise merge candidates and zero motion candidatesmay be inserted in order. Regular merge list size is signaled in sliceheader, and maximum value is 6. MMVD, TPM, CIIP rely on the regularmerge list.

(3) IBC merge list: it is done in a similar way as the regular mergelist.

Similarly, there are three AMVP lists supported in VVC:

(1) Affine AMVP candidate list

(2) Regular AMVP candidate list

(3) IBC AMVP candidate list: the same construction process as the IBCmerge list.

2.2.1 Coding Block Structure in VVC

In VVC, a Quad-Tree/Binary Tree/Ternary-Tree (QT/BT/TT) structure isadopted to divide a picture into square or rectangle blocks.

Besides QT/BT/TT, separate tree (a.k.a. Dual coding tree) is alsoadopted in VVC for I-frames. With separate tree, the coding blockstructure are signaled separately for the luma and chroma components.

In addition, the CU is set equal to PU and TU, except for blocks codedwith a couple of specific coding methods (such as intra sub-partitionprediction wherein PU is equal to TU, but smaller than CU, and sub-blocktransform for inter-coded blocks wherein PU is equal to CU, but TU issmaller than PU).

2.2.2 Affine Prediction Mode

In HEVC, only translation motion model is applied for motioncompensation prediction (MCP). While in the real world, there are manykinds of motion, e.g. zoom in/out, rotation, perspective motions and theother irregular motions. In VVC, a simplified affine transform motioncompensation prediction is applied with 4-parameter affine model and6-parameter affine model. As shown FIG. 10 the affine motion field ofthe block is described by two control point motion vectors (CPMVs) forthe 4-parameter affine model and 3 CPMVs for the 6-parameter affinemodel.

The motion vector field (MVF) of a block is described by the followingequations with the 4-parameter affine model (wherein the 4-parameter aredefined as the variables a, b, e and j) in equation (1) and 6-parameteraffine model (wherein the 4-parameter are defined as the variables a, b,c, d, e and f) in equation (2) respectively:

$\begin{matrix}\left\{ \begin{matrix}{{mv^{h}\left( {x,y} \right)} = {{{ax} - {by} + e} = {{\frac{\left( {{mv_{1}^{h}} - {mv_{0}^{h}}} \right)}{w}x} - {\frac{\left( {{mv_{1}^{v}} - {mv_{0}^{v}}} \right)}{w}y} + {mv_{0}^{h}}}}} \\{{{mv}^{v}\left( {x,y} \right)} = {{{bx} + {ay} + f} = {{\frac{\left( {{mv_{1}^{v}} - {mv_{0}^{v}}} \right)}{w}x} + {\frac{\left( {{mv_{1}^{h}} - {mv_{0}^{h}}} \right)}{w}y} + {mv_{0}^{v}}}}}\end{matrix} \right. & (1)\end{matrix}$ $\begin{matrix}\left\{ \begin{matrix}{{mv^{h}\left( {x,y} \right)} = {{{ax} + {cy} + e} = {{\frac{\left( {{mv_{1}^{h}} - {mv_{0}^{h}}} \right)}{w}x} + {\frac{\left( {{mv_{2}^{h}} - {mv_{0}^{h}}} \right)}{h}y} + {mv_{0}^{h}}}}} \\{{{mv}^{v}\left( {x,y} \right)} = {{{bx} + {dy} + f} = {{\frac{\left( {{mv_{1}^{v}} - {mv_{0}^{v}}} \right)}{w}x} + {\frac{\left( {{mv_{2}^{v}} - {mv_{0}^{v}}} \right)}{h}y} + {mv_{0}^{v}}}}}\end{matrix} \right. & (2)\end{matrix}$

where (mv^(h) ₀, mv^(h) ₀) is motion vector of the top-left cornercontrol point, and (mv^(h) ₁, mv^(h) ₁) is motion vector of thetop-right corner control point and (mv^(h) ₂, mv^(h) ₂) is motion vectorof the bottom-left corner control point, all of the three motion vectorsare called control point motion vectors (CPMV), (x, y) represents thecoordinate of a representative point relative to the top-left samplewithin current block and (mv^(h)(x,y), mv^(h)(x,y)) is the motion vectorderived for a sample located at (x, y). The CP motion vectors may besignaled (like in the affine AMVP mode) or derived on-the-fly (like inthe affine merge mode). w and h are the width and height of the currentblock. In practice, the division is implemented by right-shift with arounding operation. In VVC test model (VTM), the representative point isdefined to be the center position of a sub-block, e.g., when thecoordinate of the left-top corner of a sub-block relative to thetop-left sample within current block is (xs, ys), the coordinate of therepresentative point is defined to be (xs+2, ys+2). For each sub-block(e.g., 4×4 in VTM), the representative point is utilized to derive themotion vector for the whole sub-block.

In order to further simplify the motion compensation prediction,sub-block based affine transform prediction is applied. To derive motionvector of each M×N (both M and N are set to 4 in current VVC) sub-block,the motion vector of the center sample of each sub-block, as shown inFIG. 11 , is calculated according to Equation (1) and (2), and roundedto 1/16 fraction accuracy. Then the motion compensation interpolationfilters for 1/16-pel are applied to generate the prediction of eachsub-block with derived motion vector. The interpolation filters for1/16-pel are introduced by the affine mode.

After MCP, the high accuracy motion vector of each sub-block is roundedand saved as the same accuracy as the normal motion vector.

2.2.3 MERGE for Whole Block

2.2.3.1 Merge List Construction Of Translational Regular Merge Mode

2.2.3.1.1 History-Based Motion Vector Prediction (HMVP)

Different from the merge list design, in VVC, the history-based motionvector prediction (HMVP) method is employed.

In HMVP, the previously coded motion information is stored. The motioninformation of a previously coded block is defined as an HMVP candidate.Multiple HMVP candidates are stored in a table, named as the HMVP table,and this table is maintained during the encoding/decoding processon-the-fly. The HMVP table is emptied when starting coding/decoding anew tile/LCU row/a slice. Whenever there is an inter-coded block andnon-sub-block, non-TPM mode, the associated motion information is addedto the last entry of the table as a new HMVP candidate. The overallcoding flow is depicted in FIG. 12 .

2.2.3.1.2 Regular Merge List Construction Process

The construction of the regular merge list (for translational motion)can be summarized according to the following sequence of steps:

Step 1: Derivation of spatial candidates

Step 2: Insertion of HMVP candidates

Step 3: Insertion of pairwise average candidates

Step 4: default motion candidates

HMVP candidates can be used in both AMVP and merge candidate listconstruction processes. FIG. 13 depicts the modified merge candidatelist construction process. When the merge candidate list is not fullafter the TMVP candidate insertion, HMVP candidates stored in the HMVPtable can be utilized to fill in the merge candidate list. Consideringthat one block usually has a higher correlation with the nearestneighbourring block in terms of motion information, the HMVP candidatesin the table are inserted in a descending order of indices. The lastentry in the table is firstly added to the list, while the first entryis added in the end. Similarly, redundancy removal is applied on theHMVP candidates. Once the total number of available merge candidatesreaches the maximal number of merge candidates allowed to be signaled,the merge candidate list construction process is terminated.

It is noted that all the spatial/temporal/HMVP candidate shall be codedwith non-IBC mode. Otherwise, it is not allowed to be added to theregular merge candidate list.

HMVP table contains up to 5 regular motion candidates and each of themis unique.

2.2.3.1.2.1 Pruning Processes

A candidate is only added to the list if the corresponding candidateused for redundancy check has not the same motion information. Suchcomparison process is called pruning process.

The pruning process among the spatial candidates is dependent on theusage of TPM for current block.

When current block is coded without TPM mode (e.g., regular merge, MMVD,CIIP), the HEVC pruning process (e.g., five pruning) for the spatialmerge candidates is utilized.

2.2.4 Triangular Prediction Mode (TPM)

In VVC, a triangle partition mode is supported for inter prediction. Thetriangle partition mode is only applied to CUs that are 8×8 or largerand are coded in merge mode but not in MMVD or CIIP mode. For a CUsatisfying these conditions, a CU-level flag is signalled to indicatewhether the triangle partition mode is applied or not.

When this mode is used, a CU is split evenly into two triangle-shapedpartitions, using either the diagonal split or the anti-diagonal split,as depicted in FIG. 14 . Each triangle partition in the CU isinter-predicted using its own motion; only uni-prediction is allowed foreach partition, that is, each partition has one motion vector and onereference index. The uni-prediction motion constraint is applied toensure that same as the conventional bi-prediction, only two motioncompensated prediction are needed for each CU.

If the CU-level flag indicates that the current CU is coded using thetriangle partition mode, a flag indicating the direction of the trianglepartition (diagonal or anti-diagonal), and two merge indices (one foreach partition) are further signalled. After predicting each of thetriangle partitions, the sample values along the diagonal oranti-diagonal edge are adjusted using a blending processing withadaptive weights. This is the prediction signal for the whole CU andtransform and quantization process will be applied to the whole CU as inother prediction modes. Finally, the motion field of a CU predictedusing the triangle partition mode is stored in 4×4 units.

The regular merge candidate list is re-used for triangle partition mergeprediction with no extra motion vector pruning. For each merge candidatein the regular merge candidate list, one and only one of its L0 or L1motion vector is used for triangle prediction. In addition, the order ofselecting the L0 vs. L1 motion vector is based on its merge indexparity. With this scheme, the regular merge list can be directly used.

2.2.4.1 Merge List Construction Process for TPM

In some embodiments, the regular merge list construction process caninclude the following modifications:

(1) How to do the pruning process is dependent on the usage of TPM forcurrent block

-   -   If the current block is not coded with TPM, the HEVC 5 pruning        applied to spatial merge candidates is invoked    -   Otherwise (if the current block is coded with TPM), full pruning        is applied when adding a new spatial merge candidates. That is,        B1 is compared to A1; B0 is compared to A1 and B1; A0 is        compared to A1, B1, and B0; B2 is compared to A1, B1, A0, and        B0.

(2) The condition on whether to check of motion information from B2 isdependent on the usage of TPM for current block

-   -   If the current block is not coded with TPM, B2 is accessed and        checked only when there are less than 4 spatial merge candidates        before checking B2.    -   Otherwise (if the current block is coded with TPM), B2 is always        accessed and checked regardless how many available spatial merge        candidates before adding B2.

2.2.4.2 Adaptive Weighting Process

After predicting each triangular prediction unit, an adaptive weightingprocess is applied to the diagonal edge between the two triangularprediction units to derive the final prediction for the whole CU. Twoweighting factor groups are defined as follows:

1st weighting factor group: {⅞, 6/8, 4/8, 2/8, ⅛} and {⅞, 4/8, ⅛} areused for the luminance and the chrominance samples, respectively;

2nd weighting factor group: {⅞, 6/8, ⅝, 4/8, ⅜, 2/8, ⅛} and { 6/8, 4/8,2/8} are used for the luminance and the chrominance samples,respectively.

Weighting factor group is selected based on the comparison of the motionvectors of two triangular prediction units. The 2nd weighting factorgroup is used when any one of the following condition is true:

-   -   the reference pictures of the two triangular prediction units        are different from each other    -   absolute value of the difference of two motion vectors'        horizontal values is larger than 16 pixels.    -   absolute value of the difference of two motion vectors' vertical        values is larger than 16 pixels.

Otherwise, the 1st weighting factor group is used. An example is shownin FIG. 15 .

2.2.4.3 Motion Vector Storage

The motion vectors (Mv1 and Mv2 in FIG. 16 ) of the triangularprediction units are stored in 4×4 grids. For each 4×4 grid, eitheruni-prediction or bi-prediction motion vector is stored depending on theposition of the 4×4 grid in the CU. As shown in FIG. 16 , uni-predictionmotion vector, either Mv1 or Mv2, is stored for the 4×4 grid located inthe non-weighted area (that is, not located at the diagonal edge). Onthe other hand, a bi-prediction motion vector is stored for the 4×4 gridlocated in the weighted area. The bi-prediction motion vector is derivedfrom Mv1 and Mv2 according to the following rules:

(1) In the case that Mv1 and Mv2 have motion vector from differentdirections (L0 or L1), Mv1 and Mv2 are simply combined to form thebi-prediction motion vector.

(2) In the case that both Mv1 and Mv2 are from the same L0 (or L1)direction,

-   -   If the reference picture of Mv2 is the same as a picture in the        L1 (or L0) reference picture list, Mv2 is scaled to the picture.        Mv1 and the scaled Mv2 are combined to form the bi-prediction        motion vector.    -   If the reference picture of Mv1 is the same as a picture in the        L1 (or L0) reference picture list, Mv1 is scaled to the picture.        The scaled Mv1 and Mv2 are combined to form the bi-prediction        motion vector.    -   Otherwise, only Mv1 is stored for the weighted area.

2.2.4.4 Syntax Tables, Semantics and Decoding Process for Merge Mode

The added changes are highlighted in underlined bold faced italics. Thedeletions are marked with [[ ]].

7.3.5.1 General Slice Header Syntax

Descriptor slice_header( ) {  slice_pic_parameter_set_id ue(v)  if(rect_slice_flag | | NumBricksInPic > 1 )   slice_address u(v)  if(!rect_slice_flag && !single_brick_per_slice_flag )  num_bricks_in_slice_minus1 ue(v)  slice_type ue(v) ...  

  if( sps_temporal_mvp_enabled_flag )    slice_temporal_mvp_enabled_flagu(1)   if( slice_type = = B )    mvd_l1_zero_flag u(1)   if(cabac_init_present_flag )    cabac_init_flag u(1)   if(slice_temporal_mvp_enabled_flag ) {    if( slice_type = = B )    collocated_from_l0_flag u(1)   }   if( ( weighted_pred_flag &&slice_type = = P ) | |    ( weighted_bipred_flag && slice_type = = B ) )   pred_weight_table( )   

ue(v)   

   

  

   

  

   

 

  

ue(v)  slice_qp_delta se(v)  if(pps_slice_chroma_qp_offsets_present_flag ) {   slice_cb_qp_offset se(v)  slice_cr_qp_offset se(v)  } ...  byte_alignment( ) }

7.3.7.5 Coding Unit Syntax

Descriptor coding_unit( x0, y0, cbWidth, cbHeight, treeType ) {  if(slice_type != I | | sps_ibc_enabled_flag ) {   if( treeType !=DUAL_TREE_CHROMA &&    !( cbWidth = = 4 && cbHeight = = 4 &&!sps_ibc_enabled_flag ) )     cu_skip_flag[ x0 ][ y0 ] ae(v)   if(cu_skip_flag[ x0 ][ y0 ] = = 0 && slice_type != I    && !( cbWidth = = 4&& cbHeight = = 4 ) )     pred_mode_flag ae(v)   if( ( ( slice_type = =I && cu_skip_flag[ x0 ][ y0 ] = = 0 ) | |     ( slice_type != I && (CuPredMode[ x0 ][ y0 ] != MODE_INTRA | |     ( cbWidth = = 4 && cbHeight= = 4 && cu_skip_flag[ x0 ][ y0 ] = = 0 ) ) ) ) &&    sps_ibc_enabled_flag && ( cbWidth != 128 | | cbHeight!= 128 ) )    pred_mode_ibc_flag ae(v)  }  if( CuPredMode[ x0 ][ y0 ] = =MODE_INTRA ) { ...   }  } else if( treeType != DUAL_TREE_CHROMA ) { /*MODE_INTER or MODE_IBC */   if( cu_skip_flag[ x0 ][ y0 ] = = 0 )    general_merge_flag[ x0 ][ y0 ] ae(v)   if( general_merge_flag[ x0 ][y0 ] ) {     merge_data( x0, y0, cbWidth, cbHeight )   

    

    

    

     

     

    

  } else {     if( slice_type = = B )       inter_pred_idc[ x0 ][ y0 ]ae(v)     if( sps_affine_enabled_flag && cbWidth >= 16 && cbHeight >= 16) {      inter_affine_flag[ x0 ][ y0 ] ae(v)      if(sps_affine_type_flag && inter_affine_flag[ x0 ][ y0 ] )      cu_affine_type_flag[ x0 ][ y0 ] ae(v)     }     if(sps_smvd_enabled_flag && inter_pred_idc[ x0 ][ y0 ] = = PRED_BI &&     !inter_affine_flag[ x0 ][ y0 ] && RefIdxSymL0 > −1 && RefIdxSymL1 >−1 )      sym_mvd_flag[ x0 ][ y0 ] ae(v) ...  } }

7.3.7.7 Merge Data Syntax

Descriptor merge_data(x0, y0, cbWidth, cbHeight ) {  

  

   

 

  if( sps_mmvd_enabled_flag | | cbWidth * cbHeight != 32 )   regular_merge_flag[ x0 ][ y0 ] ae(v)   if ( regular_merge_flag[ x0 ][y0 ] = = 1 ){    if( MaxNumMergeCand > 1 )     merge_idx[ x0 ][ y0 ]ae(v)   } else {    if( sps_mmvd_enabled_flag && cbWidth * cbHeight !=32 )     mmvd_merge_flag[ x0 ][ y0 ] ae(v)    if( mmvd_merge_flag[ x0 ][y0 ] = = 1 ) {     if( MaxNumMergeCand > 1 )      mmvd_cand_flag[ x0 ][y0 ] ae(v)     mmvd_distance_idx[ x0 ][ y0 ] ae(v)    mmvd_direction_idx[ x0 ][ y0 ] ae(v)    } else {     if(MaxNumSubblockMergeCand > 0 && cbWidth >= 8 && cbHeight >= 8 )     merge_subblock_flag[ x0 ][ y0 ] ae(v)     if( merge_subblock_flag[x0 ][ y0 ] = = 1 ) {      if( MaxNumSubblockMergeCand > 1 )      merge_subblock_idx[ x0 ][y0 ] ae(v)     } else {      if(sps_ciip_enabled_flag && cu_skip_flag[ x0 ][ y0 ] = = 0 &&       (cbWidth * cbHeight ) >= 64 && cbWidth < 128 && cbHeight < 128 ) {      ciip_flag[ x0 ][ y0 ] ae(v)      if( ciip_flag[ x0 ][ y0 ] &&MaxNumMergeCand > 1 )       merge_idx[ x0 ][ y0 ] ae(v)      }      if(MergeTriangleFlag[ x0 ][ y0 ] ) {       merge_triangle_split_dir[ x0 ][y0 ] ae(v)       merge_triangle_idx0[ x0 ][ y0 ] ae(v)      merge_triangle_idx1[ x0 ][ y0 ] ae(v)      }     }    }   }  } }

7.4.6.1 General Slice Header Semantics

six_minus_max_num_merge_cand specifies the maximum number of mergingmotion vector prediction (MVP) candidates supported in the slicesubtracted from 6. The maximum number of merging MVP candidates,MaxNumMergeCand is derived as follows:

MaxNumMergeCand=6−six_minus_max_num_merge_cand   (7-57)

The value of MaxNumMergeCand shall be in the range of 1 to 6, inclusive.

five_minus_max_num_subblock_merge_cand specifies the maximum number ofsubblock-based merging motion vector prediction (MVP) candidatessupported in the slice subtracted from 5. Whenfive_minus_max_num_subblock_merge_cand is not present, it is inferred tobe equal to 5−sps_sbtmvp_enabled_flag. The maximum number ofsubblock-based merging MVP candidates, MaxNumSubblockMergeCand isderived as follows:

MaxNumSubblockMergeCand=5−five_minus_max_num_subblock_merge_cand  (7-58)

The value of MaxNumSubblockMergeCand shall be in the range of 0 to 5,inclusive.

7.4.8.5 Coding Unit Semantics

pred_mode_flag equal to 0 specifies that the current coding unit iscoded in inter prediction mode. pred_mode_flag equal to 1 specifies thatthe current coding unit is coded in intra prediction mode.

When pred_mode_flag is not present, it is inferred as follows:

-   -   If cbWidth is equal to 4 and cbHeight is equal to 4,        pred_mode_flag is inferred to be equal to 1.    -   Otherwise, pred_mode_flag is inferred to be equal to 1 when        decoding an I slice, and equal to 0 when decoding a P or B        slice, respectively.

The variable CuPredMode[x][y] is derived as follows for x =x0 . . .x0+cbWidth−1 and y=y0 . . . y0+cbHeight−1:

-   -   If pred_mode_flag is equal to 0, CuPredMode[x][y] is set equal        to MODE_INTER.    -   Otherwise (pred_mode_flag is equal to 1), CuPredMode[x][y] is        set equal to MODE_INTRA.

pred_mode_ibc_flag equal to 1 specifies that the current coding unit iscoded in IBC prediction mode. pred_mode_ibc_flag equal to 0 specifiesthat the current coding unit is not coded in IBC prediction mode.

When pred_mode_ibc_flag is not present, it is inferred as follows:

-   -   If cu_skip_flag[x0][y0] is equal to 1, and cbWidth is equal to        4, and cbHeight is equal to 4, pred_mode_ibc_flag is inferred to        be equal 1.    -   Otherwise, if both cbWidth and cbHeight are equal to 128,        pred_mode_ibc_flag is inferred to be equal to 0.    -   Otherwise, pred_mode_ibc_flag is infered to be equal to the        value of sps_ibc_enabled_flag when decoding an I slice, and 0        when decoding a P or B slice, respectively.

When pred_mode_ibc_flag is equal to 1, the variable CuPredMode[x][y] isset to be equal to MODE_IBC for x=x0 . . . x0+cbWidth−1 and y=y0 . . .y0+cbHeight−1.

general_merge_flag[x0][y0] specifies whether the inter predictionparameters for the current coding unit are inferred from a neighbouringinter-predicted partition. The array indices x0, y0 specify the location(x0, y0) of the top-left luma sample of the considered coding blockrelative to the top-left luma sample of the picture.

When general_merge_flag[x0][y0] is not present, it is inferred asfollows:

-   -   If cu_skip_flag[x0][y0] is equal to 1,        general_merge_flag[x0][y0] is inferred to be equal to 1.    -   Otherwise, general_merge_flag[x0][y0] is inferred to be equal to        0.

mvp_l0_flag[x0][y0] specifies the motion vector predictor index of list0 where x0, y0 specify the location (x0, y0) of the top-left luma sampleof the considered coding block relative to the top-left luma sample ofthe picture.

When mvp_l0_flag[x0][y0] is not present, it is inferred to be equal to0.

mvp_l1_flag[x0][y0] has the same semantics as mvp_l0_flag, with l0 andlist 0 replaced by l1 and list 1, respectively.

inter_pred_idc[x0][y0] specifies whether list0, list1, or bi-predictionis used for the current coding unit according to Table 7-10. The arrayindices x0, y0 specify the location (x0, y0) of the top-left luma sampleof the considered coding block relative to the top-left luma sample ofthe picture.

TABLE 7-10 Name association to inter prediction mode Name ofinter_pred_idc inter_pred_idc ( cbWidth + cbHeight ) > 12 ( cbWidth +cbHeight ) = = 12 ( cbWidth + cbHeight ) = = 8 0 PRED_L0 PRED_L0 n.a. 1PRED_L1 PRED_L1 n.a. 2 PRED_BI n.a. n.a.

When inter_pred_idc[x0][y0] is not present, it is inferred to be equalto PRED_L0.

7.4.8.7 Merge Data Semantics

regular_merge_flag[x0][y0] equal to 1 specifies that regular merge modeis used to generate the inter prediction parameters of the currentcoding unit. The array indices x0, y0 specify the location (x0, y0) ofthe top-left luma sample of the considered coding block relative to thetop-left luma sample of the picture.

When regular_merge_flag[x0][y0] is not present, it is inferred asfollows:

-   -   If all the following conditions are true,        regular_merge_flag[x0][y0] is inferred to be equal to 1:        -   sps_mmvd_enabled_flag is equal to 0.        -   general_merge_flag[x0][y0] is equal to 1.        -   cbWidth*cbHeight is equal to 32.    -   Otherwise, regular_merge_flag[x0][y0] is inferred to be equal to        0.

mmvd_merge_flag[x0][y0] equal to 1 specifies that merge mode with motionvector difference is used to generate the inter prediction parameters ofthe current coding unit. The array indices x0, y0 specify the location(x0, y0) of the top-left luma sample of the considered coding blockrelative to the top-left luma sample of the picture.

When mmvd_merge_flag[x0][y0] is not present, it is inferred as follows:

-   -   If all the following conditions are true,        mmvd_merge_flag[x0][y0] is inferred to be equal to 1:        -   sps_mmvd_enabled_flag is equal to 1.        -   general_merge_flag[x0][y0] is equal to 1.        -   cbWidth*cbHeight is equal to 32.        -   regular_merge_flag[x0][y0] is equal to 0.    -   Otherwise, mmvd_merge_flag[x0][y0] is inferred to be equal to 0.

mmvd_cand_flag[x0][y0] specifies whether the first (0) or the second (1)candidate in the merging candidate list is used with the motion vectordifference derived from mmvd_distance_idx[x0][y0] andmmvd_direction_idx[x0][y0]. The array indices x0, y0 specify thelocation (x0, y0) of the top-left luma sample of the considered codingblock relative to the top-left luma sample of the picture.

When mmvd_cand_flag[x0][y0] is not present, it is inferred to be equalto 0.

mmvd_distance_idx[x0][y0] specifies the index used to deriveMmvdDistance[x0][y0] as specified in Table 7-12. The array indices x0,y0 specify the location (x0, y0) of the top-left luma sample of theconsidered coding block relative to the top-left luma sample of thepicture.

TABLE 7-12 Specification of MmvdDistance[ x0 ][ y0 ] based onmmvd_distance_idx[ x0 ][ y0 ]. mmvd_distance_idx[ MmvdDistance[ x0 ][ y0] x0 ][ y0 ] slice_fpel_mmvd_enabled_flag = = 0slice_fpel_mmvd_enabled_flag = = 1 0 1 4 1 2 8 2 4 16 3 8 32 4 16 64 532 128 6 64 256 7 128 512

mmvd_direction_idx[x0][y0] specifies index used to deriveMmvdSign[x0][y0] as specified in Table 7-13. The array indices x0, y0specify the location (x0, y0) of the top-left luma sample of theconsidered coding block relative to the top-left luma sample of thepicture.

TABLE 7-13 Specification of MmvdSign[ x0 ][ y0 ] based onmmvd_direction_idx[ x0 ][ y0 ] mmvd_direction_idx[ x0 ][ y0 ] MmvdSign[x0 ][ y0 ][0] MmvdSign[ x0 ][ y0 ][1] 0 +1 0 1 −1 0 2 0 +1 3 0 −1

Both components of of the merge plus MVD offset MmvdOffset[x0][y0] arederived as follows:

MmvdOffset[x0][y0][0]=(MmvdDistance[x0][y0]<<2)*MmvdSign[x0][y0][0]  (7-124)

MmvdOffset[x0][y0][1]=(MmvdDistance[x0][y0]<<2)*MmvdSign[x0][y0][1]  (7-125)

merge_subblock_flag[x0][y0] specifies whether the subblock-based interprediction parameters for the current coding unit are inferred fromneighbouring blocks. The array indices x0, y0 specify the location (x0,y0) of the top-left luma sample of the considered coding block relativeto the top-left luma sample of the picture. Whenmerge_subblock_flag[x0][y0] is not present, it is inferred to be equalto 0.

merge_subblock_idx[x0][y0] specifies the merging candidate index of thesubblock-based merging candidate list where x0, y0 specify the location(x0, y0) of the top-left luma sample of the considered coding blockrelative to the top-left luma sample of the picture.

When merge_subblock_idx[x0][y0] is not present, it is inferred to beequal to 0.

ciip_flag[x0][y0] specifies whether the combined inter-picture merge andintra-picture prediction is applied for the current coding unit. Thearray indices x0, y0 specify the location (x0, y0) of the top-left lumasample of the considered coding block relative to the top-left lumasample of the picture.

When ciip_flag[x0][y0] is not present, it is inferred to be equal to 0.

When ciip_flag[x0][y0] is equal to 1, the variable IntraPredModeY[x][y]with x=xCb . . . xCb+cbWidth−1 and y=yCb . . . yCb+cbHeight−1 is set tobe equal to INTRA_PLANAR.

The variable MergeTriangleFlag[x0][y0], which specifies whethertriangular shape based motion compensation is used to generate theprediction samples of the current coding unit, when decoding a B slice.is derived as follows:

-   -   If all the following conditions are true,        MergeTriangleFlag[x0][y0] is set equal to 1:        -   sps_triangle_enabled_flag is equal to 1.        -   slice_type is equal to B.        -   general_merge_flag[x0][y0] is equal to 1.        -   MaxNumTriangleMergeCand is greater than or equal to 2.        -   cbWidth*cbHeight is greater than or equal to 64.        -   regular_merge_flag[x0][y0] is equal to 0.        -   mmvd_merge_flag[x0][y0] is equal to 0.        -   merge_subblock_flag[x0][y0] is equal to 0.        -   ciip_flag[x0][y0] is equal to 0.    -   Otherwise, MergeTriangleFlag[x0][y0] is set equal to 0.

merge_triangle_split_dir[x0][y0] specifies the splitting direction ofmerge triangle mode. The array indices x0, y0 specify the location (x0,y0) of the top-left luma sample of the considered coding block relativeto the top-left luma sample of the picture.

When merge_triangle_split_dir[x0][y0] is not present, it is inferred tobe equal to 0.

merge_triangle_idx0[x0][y0] specifies the first merging candidate indexof the triangular shape based motion compensation candidate list wherex0, y0 specify the location (x0, y0) of the top-left luma sample of theconsidered coding block relative to the top-left luma sample of thepicture.

When merge_triangle_idx0[x0][y0] is not present, it is inferred to beequal to 0.

merge_triangle_idx1[x0][y0] specifies the second merging candidate indexof the triangular shape based motion compensation candidate list wherex0, y0 specify the location (x0, y0) of the top-left luma sample of theconsidered coding block relative to the top-left luma sample of thepicture.

When merge_triangle_idx1[x0][y0] is not present, it is inferred to beequal to 0.

merge_idx[x0][y0] specifies the merging candidate index of the mergingcandidate list where x0, y0 specify the location (x0, y0) of thetop-left luma sample of the considered coding block relative to thetop-left luma sample of the picture.

When merge_idx[x0][y0] is not present, it is inferred as follows:

-   -   If mmvd_merge_flag[x0][y0] is equal to 1, merge_idx[x0][y0] is        inferred to be equal to mmvd_cand_flag[x0][y0 ].    -   Otherwise (mmvd_merge_flag[x0][y0] is equal to 0),        merge_idx[x0][y0] is inferred to be equal to 0.

2.2.4.4.1 Decoding Process

In some embodiments, the decoding process is defined as follows:

8.5.2.2 Derivation Process for Luma Motion Vectors for Merge Mode

This process is only invoked when general_merge_flag[xCb][yCb] is equalto 1, where (xCb, yCb) specify the top-left sample of the current lumacoding block relative to the top-left luma sample of the currentpicture. Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are:

-   -   the luma motion vectors in 1/16 fractional-sample accuracy        mvL0[0][0] and mvL1[0][0],    -   the reference indices refIdxL0 and refIdxL1,    -   the prediction list utilization flags predFlagL0[0][0] and        predFlagL1[0][0],    -   the bi-prediction weight index bcwldx.    -   the merging candidate list mergeCandList.

The bi-prediction weight index bcwldx is set equal to 0.

The motion vectors mvL0[0][0] and mvL1[0][0], the reference indicesrefIdxL0 and refIdxL1 and the prediction utilization flagspredFlagL0[0][0] and predFlagL1[0][0] are derived by the followingordered steps:

-   -   1. The derivation process for spatial merging candidates from        neighbouring coding units as specified in clause 8.5.2.4 is        invoked with the luma coding block location (xCb, yCb), the luma        coding block width cbWidth, and the luma coding block height        cbHeight as inputs, and the output being the availability flags        availableFlagA₀, availableFlagA₁, availableFlagB₀,        availableFlagB₁ and availableFlagB₂, the reference indices        refIdxLXA₀, refIdxLXA₁, refIdxLXB₀, refIdxLXB₁ and refIdxLXB₂,        the prediction list utilization flags predFlagLXA₀,        predFlagLXA₁, predFlagLXB₀, predFlagLXB₁ and predFlagLXB₂, and        the motion vectors mvLXA₀, mvLXA₁, mvLXB₀, mvLXB₁ and mvLXB₂,        with X being 0 or 1, and the bi-prediction weight indices        bcwIdxA₀, bcwIdxA₁, bcwIdxB₀, bcwIdxB₁, bcwIdxB₂.    -   2. The reference indices, refIdxLXCol, with X being 0 or 1, and        the bi-prediction weight index bcwIdxCol for the temporal        merging candidate Col are set equal to 0.    -   3. The derivation process for temporal luma motion vector        prediction as specified in in clause 8.5.2.11 is invoked with        the luma location (xCb, yCb), the luma coding block width        cbWidth, the luma coding block height cbHeight and the variable        refIdxL0Col as inputs, and the output being the availability        flag availableFlagL0Col and the temporal motion vector mvL0Col.        The variables availableFlagCol, predFlagL0Col and predFlagL1Col        are derived as follows:

availableFlagCol=availableFlagL0Col   (8-263)

predFlagL0Col=availableFlagL0Col   (8-264)

predFlagL1Col=0   (8-265)

-   -   4. When slice_type is equal to B, the derivation process for        temporal luma motion vector prediction as specified in clause        8.5.2.11 is invoked with the luma location (xCb, yCb), the luma        coding block width cbWidth, the luma coding block height        cbHeight and the variable refIdxL1Col as inputs, and the output        being the availability flag availableFlagL1Col and the temporal        motion vector mvL1Col. The variables availableFlagCol and        predFlagL1Col are derived as follows:

availableFlagCol=availableFlagL0Col∥availableFlagL1Col   (8-266)

predFlagL1Col=availableFlagL1Col   (8-267)

-   -   5. The merging candidate list, mergeCandList, is constructed as        follows:

i=0

if(availableFlagA ₁) mergeCandList[i++]=A ₁

if(availableFlagB ₁) mergeCandList[i++]=B ₁

if(availableFlagB ₀) mergeCandList[i++]=B ₀   (8-268)

if(availableFlagA ₀) mergeCandList[i++]=A ₀

if(availableFlagB ₂) mergeCandList[i++]=B2

if(availableFlagCol) mergeCandList[i++]=Col

-   -   6. The variable numCurrMergeCand and numOrigMergeCand are set        equal to the number of merging candidates in the mergeCandList.    -   7. When numCurrMergeCand is less than (MaxNumMergeCand−1) and        NumHmvpCand is greater than 0, the following applies:        -   The derivation process of history-based merging candidates            as specified in 8.5.2.6 is invoked with mergeCandList and            numCurrMergeCand as inputs, and modified mergeCandList and            numCurrMergeCand as outputs.        -   numOrigMergeCand is set equal to numCurrMergeCand.    -   8. When numCurrMergeCand is less than MaxNumMergeCand and        greater than 1, the following applies:        -   The derivation process for pairwise average merging            candidate specified in clause 8.5.2.4 is invoked with            mergeCandList, the reference indices refIdxL0N and            refIdxL1N, the prediction list utilization flags predFlagL0N            and predFlagL1N, the motion vectors mvL0N and mvL1N of every            candidate N in mergeCandList, and numCurrMergeCand as            inputs, and the output is assigned to mergeCandList,            numCurrMergeCand, the reference indices refIdxL0avgCand and            refIdxL1avgCand, the prediction list utilization flags            predFlagL0avgCand and predFlagL1avgCand and the motion            vectors mvL0avgCand and mvL1avgCand of candidate avgCand            being added into mergeCandList. The bi-prediction weight            index bcwIdx of candidate avgCand being added into            mergeCandList is set equal to 0.        -   numOrigMergeCand is set equal to numCurrMergeCand.    -   9. The derivation process for zero motion vector merging        candidates specified in clause 8.5.2.5 is invoked with the        mergeCandList, the reference indices refIdxL0N and refIdxL1N,        the prediction list utilization flags predFlagL0N and        predFlagL1N, the motion vectors mvL0N and mvL1N of every        candidate N in mergeCandList and numCurrMergeCand as inputs, and        the output is assigned to mergeCandList, numCurrMergeCand, the        reference indices refIdxL0zeroCand_(m) and refIdxL1zeroCand_(m),        the prediction list utilization flags predFlagL0zeroCand_(m) and        predFlagL1zeroCand_(m) and the motion vectors mvL0zeroCand_(m)        and mvL1zeroCand_(m) of every new candidate zeroCand_(m) being        added into mergeCandList. The bi-prediction weight index bcwldx        of every new candidate zeroCand_(m) being added into        mergeCandList is set equal to 0. The number of candidates being        added, numZeroMergeCand, is set equal to        (numCurrMergeCand−numOrigMergeCand). When numZeroMergeCand is        greater than 0, m ranges from 0 to numZeroMergeCand−1,        inclusive.    -   10. The following assignments are made with N being the        candidate at position merge_idx[xCb][yCb] in the merging        candidate list mergeCandList        (N=mergeCandList[merge_idx[xCb][yCb]]) and X being replaced by 0        or 1:

refIdxLX=refIdxLXN   (8-269)

predFlagLX[0][0]=predFlagLXN   (8-270)

mvLX[0][0][0]=mvLXN[0]  (8-271)

mvLX[0][0][1]=mvLXN[1]  (8-272)

bcwIdx=bcwIdxN   (8-273)

-   -   11. When mmvd_merge_flag[xCb][yCb] is equal to 1, the following        applies:        -   The derivation process for merge motion vector difference as            specified in 8.5.2.7 is invoked with the luma location (xCb,            yCb), the reference indices refIdxL0, refIdxL1 and the            prediction list utilization flags predFlagL0[0][0] and            predFlagL1[0 ][0] as inputs, and the motion vector            differences mMvdL0 and mMvdL1 as outputs.        -   The motion vector difference mMvdLX is added to the merge            motion vectors mvLX for X being 0 and 1 as follows:

mvLX[0][0][0]+=mMvdLX[0]  (8-274)

mvLX[0][0][1]+=mMvdLX[1]  (8-275)

mvLX[0][0][0]=Clip3(−2¹⁷, 2¹⁷−1, mvLX[0][0][0])   (8-276)

mvLX[0][0][1]=Clip3(−2¹⁷, 2¹⁷−1, mvLX[0][0][1])   (8-277)

2.2.5 MMVD

In some embodiments, ultimate motion vector expression (UMVE, also knownas MMVD) is presented. UMVE is used for either skip or merge modes witha motion vector expression method.

UMVE re-uses merge candidate as same as those included in the regularmerge candidate list in VVC. Among the merge candidates, a basecandidate can be selected, and is further expanded by the motion vectorexpression method.

UMVE provides a new motion vector difference (MVD) representationmethod, in which a starting point, a motion magnitude and a motiondirection are used to represent a MVD.

In some embodiments, a merge candidate list is used as is. But onlycandidates which are default merge type (MRG_TYPE_DEFAULT_N) areconsidered for UMVE's expansion.

Base candidate index defines the starting point. Base candidate indexindicates the best candidate among candidates in the list as follows.

TABLE 4 Base candidate IDX Base candidate IDX 0 1 2 3 N^(th) MVP 1^(st)MVP 2^(nd) MVP 3^(rd) MVP 4^(th) MVP

If the number of base candidate is equal to 1, Base candidate index(IDX) is not signaled.

Distance index is motion magnitude information. Distance index indicatesthe pre-defined distance from the starting point information.Pre-defined distance is as follows:

TABLE 5 Distance IDX Distance IDX 0 1 2 3 4 5 6 7 Pixel ¼- ½- 1- 2- 4-8- 16- 32- distance pel pel pel pel pel pel pel pel

Direction index represents the direction of the MVD relative to thestarting point. The direction index can represent of the four directionsas shown below.

TABLE 6 Direction IDX Direction IDX 00 01 10 11 x-axis + − N/A N/Ay-axis N/A N/A + −

UMVE flag is singnaled right after sending a skip flag or merge flag. Ifskip or merge flag is true, UMVE flag is parsed. If UMVE flage is equalto 1, UMVE syntaxes are parsed. But, if not 1, AFFINE flag is parsed. IfAFFINE flag is equal to 1, that is AFFINE mode, But, if not 1,skip/merge index is parsed for VTM's skip/merge mode.

Additional line buffer due to UMVE candidates is not needed. Because askip/merge candidate of software is directly used as a base candidate.Using input UMVE index, the supplement of MV is decided right beforemotion compensation. There is no need to hold long line buffer for this.

In current common test condition, either the first or the second mergecandidate in the merge candidate list can be selected as the basecandidate.

UMVE is also known as Merge with MV Differences (MMVD).

2.2.6 Combined Intra-Inter Prediction (CIIP)

In some embodiments, multi-hypothesis prediction is proposed, whereincombined intra and inter prediction is one way to generate multiplehypotheses.

When the multi-hypothesis prediction is applied to improve intra mode,multi-hypothesis prediction combines one intra prediction and one mergeindexed prediction. In a merge CU, one flag is signaled for merge modeto select an intra mode from an intra candidate list when the flag istrue. For luma component, the intra candidate list is derived from onlyone intra prediction mode, e.g., planar mode. The weights applied to theprediction block from intra and inter prediction are determined by thecoded mode (intra or non-intra) of two neighboring blocks (A1 and B1).

2.2.7 MERGE for Sub-Block-Based Technologies

It is suggested that all the sub-block related motion candidates are putin a separate merge list in addition to the regular merge list fornon-sub block merge candidates.

The sub-block related motion candidates are put in a separate merge listis named as ‘sub-block merge candidate list’.

In one example, the sub-block merge candidate list includes ATMVPcandidate and affine merge candidates.

The sub-block merge candidate list is filled with candidates in thefollowing order:

1. ATMVP candidate (maybe available or unavailable);

2. Affine merge lists (including Inherited Affine candidates; andConstructed Affine candidates)

3. Padding as zero MV 4-parameter affine model

2.2.7.1 ATMVP (aka Sub-Block Temporal Motion Vector Predictor, SbTMVP)

Basic idea of ATMVP is to derive multiple sets of temporal motion vectorpredictors for one block. Each sub-block is assigned with one set ofmotion information. When an ATMVP merge candidate is generated, themotion compensation is done in 8×8 level instead of the whole blocklevel.

In current design, ATMVP predicts the motion vectors of the sub-CUswithin a CU in two steps which are described in the following twosub-sections respectively.

2.2.7.1.1 Derivation of Initialized Motion Vector

Denote the initialized motion vector by tempMv. When block A1 isavailable and non-intra coded (e.g., coded with inter or IBC mode), thefollowing is applied to derive the initialized motion vector.

-   -   If all of the following conditions are true, tempMv is set equal        to the motioin vector of block A1 from list 1, denoted by        mvL1A₁:    -   Refernece picture index of list 1 is avaialable (not equal to        −1), and it has the same picture order count (POC) value as the        collocated picture (e.g., DiffPicOrderCnt(ColPic,        RefPicList[1][refIdxL1A₁]) is equal to 0),    -   All reference pictures are with no larger POC compared to the        current picure (e.g., DiffPicOrderCnt(aPic, currPic) is less        than or equal to 0 for every picture aPic in every reference        picture list of the current slice),    -   Current slice is equal to B slice,    -   collocated_from_l0_flag is equal to 0.    -   Otherwise if all of the following conditions are true, tempMv is        set equal to the motioin vector of block A1 from list 0, denoted        by mvL0A₁:    -   Refernece picture index of list 0 is avaialable (not equal to        −1),    -   it has the same POC value as the collocated picture (e.g.,        DiffPicOrderCnt(ColPic, RefPicList[0][refIdxL0A₁]) is equal to        0).    -   Otherwise, zero motion vector is used as the initialized MV.

A corresponding block (with center position of current block plus therounded MV, clipped to be in certain ranges in necessary) is identifiedin the collocated picture signaled at the slice header with theinitialized motion vector.

If the block is inter-coded, then go to the 2^(nd) step. Otherwise, theATMVP candidate is set to be NOT available.

2.2.7.1.2 Sub-CU Motion Derivation

The second step is to split the current CU into sub-CUs and obtain themotion information of each sub-CU from the block corresponding to eachsub-CU in the collocated picture.

If the corresponding block for a sub-CU is coded with inter mode, themotion information is utilized to derive the final motion information ofcurrent sub-CU by invoking the derivation process for collocated MVswhich is not different with the process for conventional TMVP process.Basically, if the corresponding block is predicted from the target listX for uni-prediction or bi-prediction, the motion vector is utilized;otherwise, if it is predicted from list Y (Y=1−X) for uni orbi-prediction and NoBackwardPredFlag is equal to 1, MV for list Y isutilized. Otherwise, no motion candidate can be found.

If the block in the collocated picture identified by the initialized MVand location of current sub-CU is intra or IBC coded, or no motioncandidate can be found as described above, the following further apply:

Denote the motion vector used to fetch the motion field in thecollocated picture Rcol as MVcol. To minimize the impact due to MVscaling, the MV in the spatial candidate list used to derive MVcol isselected in the following way: if the reference picture of a candidateMV is the collocated picture, this MV is selected and used as MVcolwithout any scaling. Otherwise, the MV having a reference pictureclosest to the collocated picture is selected to derive MVcol withscaling.

The example decoding process for collocated motion vectors derivationprocess is described as follows:

8.5.2.12 Derivation Process for Collocated Motion Vectors

Inputs to this process are:

-   -   a variable currCb specifying the current coding block,    -   a variable colCb specifying the collocated coding block inside        the collocated picture specified by ColPic,    -   a luma location (xColCb, yColCb) specifying the top-left sample        of the collocated luma coding block specified by colCb relative        to the top-left luma sample of the collocated picture specified        by ColPic,    -   a reference index refIdxLX, with X being 0 or 1,    -   a flag indicating a subblock temporal merging candidate sbFlag.

Outputs of this process are:

-   -   the motion vector prediction mvLXCol in 1/16 fractional-sample        accuracy,    -   the availability flag availableFlagLXCol.

The variable currPic specifies the current picture.

The arrays predFlagL0Col[x][y], mvL0Col[x][y] and refIdxL0Col[x][y] areset equal to PredFlagL0[x][y], MvDmvrL0[x][y] and RefIdxL0[x][y],respectively, of the collocated picture specified by ColPic, and thearrays predFlagL1Col[x][y], mvL1Col[x][y] and refIdxL1Col[x][y] are setequal to PredFlagL1[x][y ], MvDmvrL1[x][y] and RefIdxL1[x][y],respectively, of the collocated picture specified by ColPic.

The variables mvLXCol and availableFlagLXCol are derived as follows:

-   -   If colCb is coded in an intra or IBC prediction mode, both        components of mvLXCol are set equal to 0 and availableFlagLXCol        is set equal to 0.    -   Otherwise, the motion vector mvCol, the reference index        refIdxCol and the reference list identifier listCol are derived        as follows:        -   If sbFlag is equal to 0, availableFlagLXCol is set to 1 and            the following applies:            -   If predFlagL0Col[xColCb][yColCb] is equal to 0, mvCol,                refIdxCol and listCol are set equal to                mvL1Col[xColCb][yColCb], refIdxL1Col[xColCb][yColCb] and                L1, respectively.            -   Otherwise, if predFlagL0Col[xColCb][yColCb] is equal to                1 and predFlagL1Col[xColCb][yColCb] is equal to 0,                mvCol, refIdxCol and listCol are set equal to                mvL0Col[xColCb][yColCb], refIdxL0Col[xColCb][yColCb] and                L0, respectively.            -   Otherwise (predFlagL0Col[xColCb][yColCb] is equal to 1                and predFlagL1Col[xColCb][yColCb] is equal to 1), the                following assignments are made:                -   If NoBackwardPredFlag is equal to 1, mvCol,                    refIdxCol and listCol are set equal to                    mvLXCol[xColCb][yColCb], refIdxLXCol[xColCb][yColCb]                    and LX, respectively.                -   Otherwise, mvCol, refIdxCol and listCol are set                    equal to mvLNCol[xColCb][yColCb],                    refIdxLNCol[xColCb][yColCb] and LN, respectively,                    with N being the value of collocated_from_l0_flag.        -   Otherwise (sbFlag is equal to 1), the following applies:            -   If PredFlagLXCol[xColCb][yColCb] is equal to 1, mvCol,                refIdxCol, and listCol are set equal to                mvLXCol[xColCb][yColCb], refIdxLXCol[xColCb][yColCb],                and LX, respectively, availableFlagLXCol is set to 1.            -   Otherwise (PredFlagLXCol[xColCb][yColCb] is equal to 0),                the following applies:                -   If DiffPicOrderCnt(aPic, currPic) is less than or                    equal to 0 for every picture aPic in every reference                    picture list of the current slice and                    PredFlagLYCol[xColCb][yColCb] is equal to 1, mvCol,                    refIdxCol, and listCol are set to                    mvLYCol[xColCb][yColCb ],                    refIdxLYCol[xColCb][yColCb] and LY, respectively,                    with Y being equal to !X where X being the value of                    X this process is invoked for. availableFlagLXCol is                    set to 1.                -   Both the components of mvLXCol are set to 0 and                    availableFlagLXCol is set equal to 0.        -   When availableFlagLXCol is equal to TRUE, mvLXCol and            availableFlagLXCol are derived as follows:            -   If LongTermRefPic(currPic, currCb, refIdxLX, LX) is not                equal to LongTermRefPic(ColPic, colCb, refIdxCol,                listCol), both components of mvLXCol are set equal to 0                and availableFlagLXCol is set equal to 0.            -   Otherwise, the variable availableFlagLXCol is set equal                to 1, refPicList[listCol][refIdxCol] is set to be the                picture with reference index refIdxCol in the reference                picture list listCol of the slice containing coding                block colCb in the collocated picture specified by                ColPic, and the following applies:

colPocDiff=DiffPicOrderCnt(ColPic, refPicList[listCol][refIdxCol])  (8-402)

currPocDiff=DiffPicOrderCnt(currPic, RefPicList[X][refIdxLX])   (8-403)

-   -   -   -   -   The temporal motion buffer compression process for                    collocated motion vectors as specified in clause                    8.5.2.15 is invoked with mvCol as input, and the                    modified mvCol as output.                -   If RefPicList[X][refIdxLX] is a long-term reference                    picture, or colPocDiff is equal to currPocDiff,                    mvLXCol is derived as follows:

mvLXCol=mvCol   (8-404)

-   -   -   -   -   Otherwise, mvLXCol is derived as a scaled version of                    the motion vector mvCol as follows:

tx=(16384+(Abs(td)>>1))/td   (8-405)

distScaleFactor=Clip3(−4096, 4095, (tb*tx+32)>>6)   (8-406)

mvLXCol=Clip3(−131072, 131071,(distScaleFactor*mvCol⇄128−(distScaleFactor*mvCol>=0))>>8))   (8-407)

-   -   -   -   -   where td and tb are derived as follows:

td=Clip3(−128, 127, colPocDiff)   (8-408)

tb=Clip3(−128, 127, currPocDiff)   (8-409)

2.2.8 Refinement of Motion Information

2.2.8.1 Decoder-Side Motion Vector Refinement (DMVR)

In bi-prediction operation, for the prediction of one block region, twoprediction blocks, formed using a motion vector (MV) of list0 and a MVof list1, respectively, are combined to form a single prediction signal.In the decoder-side motion vector refinement (DMVR) method, the twomotion vectors of the bi-prediction are further refined.

For DMVR in VVC, MVD mirroring between list 0 and list 1 is assumed asshown in FIG. 19 and bilateral matching is performed to refine the MVs,e.g., to find the best MVD among several MVD candidates. Denote the MVsfor two reference picture lists by MVL0(L0X, L0Y), and MVL1(L1X, L1Y).The MVD denoted by (MvdX, MvdY) for list 0 that can minimize the costfunction (e.g., sum of absolute difference (SAD)) is defined as the bestMVD. For the SAD function, it is defined as the SAD between thereference block of list 0 derived with a motion vector (L0X+MvdX,L0Y+MvdY) in the list 0 reference picture and the reference block oflist 1 derived with a motion vector (L1X−MvdX, L1Y−MvdY) in the list 1reference picture.

The motion vector refinement process may iterate twice. In eachiteration, at most 6 MVDs (with integer-pel precision) may be checked intwo steps, as shown in FIG. 20 . In the first step, MVD (0, 0), (−1, 0),(1, 0), (0, −1), (0, 1) are checked. In the second step, one of the MVD(−1, −1), (−1, 1), (1, −1) or (1, 1) may be selected and furtherchecked. Suppose function Sad(x, y) returns SAD value of the MVD (x, y).The MVD, denoted by (MvdX, MvdY), checked in the second step is decidedas follows:

MvdX = −1; MvdY = −1; If (Sad(1, 0) < Sad(−1, 0)) MvdX = 1; If(Sad(0, 1) < Sad(0, −1)) MvdY = 1;

In the first iteration, the starting point is the signaled MV, and inthe second iteration, the starting point is the signaled MV plus theselected best MVD in the first iteration. DMVR applies only when onereference picture is a preceding picture and the other reference pictureis a following picture, and the two reference pictures are with samepicture order count distance from the current picture.

To further simplify the process of DMVR, in some embodiments, theadopted DMVR design has the following main features:

-   -   Early termination when (0,0) position SAD between list0 and        list1 is smaller than a threshold.    -   Early termination when SAD between list0 and list1 is zero for        some position.    -   Block sizes for DMVR: W*H>=64 && H>=8, wherein W and H are the        width and height of the block.    -   Split the CU into multiple of 16×16 sub-blocks for DMVR of CU        size>16*16. If only width or height of the CU is larger than 16,        it is only split in vertical or horizontal direction.    -   Reference block size (W+7)*(H+7) (for luma).    -   25 points SAD-based integer-pel search (e.g. (+−) 2 refinement        search range, single stage)    -   Bilinear-interpolation based DMVR.    -   “Parametric error surface equation” based sub-pel refinement.        This procedure is performed only when the minimum SAD cost is        not equal to zero and the best MVD is (0, 0) in the last MV        refinement iteration.    -   Luma/chroma MC w/reference block padding (if needed).    -   Refined MVs used for MC and TMVPs only.

2.2.8.1.1 Usage of DMVR

When the following conditions are all true, DMVR may be enabled:

-   -   DMVR enabling flag in the SPS (e.g., sps_dmvr_enabled_flag) is        equal to 1    -   TPM flag, inter-affine flag and subblock merge flag (either        ATMVP or affine merge), MMVD flag are all equal to 0    -   Merge flag is equal to 1    -   Current block is bi-predicted, and POC distance between current        picture and reference picture in list 1 is equal to the POC        distance between reference picture in list 0 and current picture    -   The current CU height is greater than or equal to 8    -   Number of luma samples (CU width*height) is greater than or        equal to 64

2.2.8.1.2 “Parametric Error Surface Equation” Based Sub-Pel Refinement

The method is summarized below:

1. The parametric error surface fit is computed only if the centerposition is the best cost position in a given iteration.

2. The center position cost and the costs at (−1,0), (0,−1), (1,0) and(0,1) positions from the center are used to fit a 2-D parabolic errorsurface equation of the form

E(x, y)=A(x−x ₀)² +B(y−y ₀)² +C

where (x₀, y₀) corresponds to the position with the least cost and Ccorresponds to the minimum cost value. By solving the 5 equations in 5unknowns, (x₀, y₀) is computed as:

x ₀=(E(−1,0)−E(1,0))/(2(E(−1,0)+E(1,0)−2E(0,0)))

y ₀=(E(0,−1)−E(0,1))/(2((E(0,−1)+E(0,1)−2E(0,0)))

(x₀, y₀) can be computed to any required sub-pixel precision byadjusting the precision at which the division is performed (e.g. howmany bits of quotient are computed). For 1/16^(th)-pel accuracy, just4-bits in the absolute value of the quotient needs to be computed, whichlends itself to a fast-shifted subtraction-based implementation of the 2divisions required per CU.

3. The computed (x₀, y₀) are added to the integer distance refinement MVto get the sub-pixel accurate refinement delta MV.

2.3 Intra Block Copy

Intra block copy (IBC), a.k.a. current picture referencing, has beenadopted in HEVC Screen Content Coding extensions (HEVC-SCC) and thecurrent VVC test model (VTM-4.0). IBC extends the concept of motioncompensation from inter-frame coding to intra-frame coding. Asdemonstrated in FIG. 21 , the current block is predicted by a referenceblock in the same picture when IBC is applied. The samples in thereference block must have been already reconstructed before the currentblock is coded or decoded. Although IBC is not so efficient for mostcamera-captured sequences, it shows significant coding gains for screencontent. The reason is that there are lots of repeating patterns, suchas icons and text characters in a screen content picture. IBC can removethe redundancy between these repeating patterns effectively. InHEVC-SCC, an inter-coded coding unit (CU) can apply IBC if it choosesthe current picture as its reference picture. The MV is renamed as blockvector (BV) in this case, and a BV always has an integer-pixelprecision. To be compatible with main profile HEVC, the current pictureis marked as a “long-term” reference picture in the Decoded PictureBuffer (DPB). It should be noted that similarly, in multiple view/3Dvideo coding standards, the inter-view reference picture is also markedas a “long-term” reference picture.

Following a BV to find its reference block, the prediction can begenerated by copying the reference block. The residual can be got bysubtracting the reference pixels from the original signals. Thentransform and quantization can be applied as in other coding modes.

However, when a reference block is outside of the picture, or overlapswith the current block, or outside of the reconstructed area, or outsideof the valid area restricted by some constrains, part or all pixelvalues are not defined. Basically, there are two solutions to handlesuch a problem. One is to disallow such a situation, e.g. in bitstreamconformance. The other is to apply padding for those undefined pixelvalues. The following sub-sessions describe the solutions in detail.

2.3.1 IBC in VVC Test Model (VTM4.0)

In the current VVC test model, e.g. VTM-4.0 design, the whole referenceblock should be with the current coding tree unit (CTU) and does notoverlap with the current block. Thus, there is no need to pad thereference or prediction block. The IBC flag is coded as a predictionmode of the current CU. Thus, there are totally three prediction modes,MODE_INTRA, MODE_INTER and MODE_IBC for each CU.

2.3.1.1 IBC Merge Mode

In IBC merge mode, an index pointing to an entry in the IBC mergecandidates list is parsed from the bitstream. The construction of theIBC merge list can be summarized according to the following sequence ofsteps:

Step 1: Derivation of spatial candidates

Step 2: Insertion of HMVP candidates

Step 3: Insertion of pairwise average candidates

In the derivation of spatial merge candidates, a maximum of four mergecandidates are selected among candidates located in the positionsdepicted in A₁, B₁, B₀, A₀ and B₂ as depicted in FIG. 2 . The order ofderivation is A₁, B₁, B₀, A₀ and B₂. Position B₂ is considered only whenany PU of position A₁, B₁, B₀, A₀ is not available (e.g. because itbelongs to another slice or tile) or is not coded with IBC mode. Aftercandidate at position A₁ is added, the insertion of the remainingcandidates is subject to a redundancy check which ensures thatcandidates with same motion information are excluded from the list sothat coding efficiency is improved.

After insertion of the spatial candidates, if the IBC merge list size isstill smaller than the maximum IBC merge list size, IBC candidates fromHMVP table may be inserted. Redundancy check are performed wheninserting the HMVP candidates.

Finally, pairwise average candidates are inserted into the IBC mergelist.

When a reference block identified by a merge candidate is outside of thepicture, or overlaps with the current block, or outside of thereconstructed area, or outside of the valid area restricted by someconstrains, the merge candidate is called invalid merge candidate.

It is noted that invalid merge candidates may be inserted into the IBCmerge list.

2.3.1.2 IBC AMVP Mode

In IBC AMVP mode, an AMVP index point to an entry in the IBC AMVP listis parsed from the bitstream. The construction of the IBC AMVP list canbe summarized according to the following sequence of steps:

Step 1: Derivation of spatial candidates

-   -   Check A₀, A₁ until an available candidate is found.    -   Check B₀, B₁, B₂ until an available candidate is found.

Step 2: Insertion of HMVP candidates

Step 3: Insertion of zero candidates

After insertion of the spatial candidates, if the IBC AMVP list size isstill smaller than the maximum IBC AMVP list size, IBC candidates fromHMVP table may be inserted.

Finally, zero candidates are inserted into the IBC AMVP list.

2.3.1.3 Chroma IBC Mode

In the current VVC, the motion compensation in the chroma IBC mode isperformed at sub block level. The chroma block will be partitioned intoseveral sub blocks. Each sub block determines whether the correspondingluma block has a block vector and the validity if it is present. Thereis encoder constrain in the current VTM, where the chroma IBC mode willbe tested if all sub blocks in the current chroma CU have valid lumablock vectors. For example, on a YUV 420 video, the chroma block is N×Mand then the collocated luma region is 2N×2M. The sub block size of achroma block is 2×2. There are several steps to perform the chroma myderivation then the block copy process.

(1) The chroma block will be first partitioned into (N>>1)*(M>>1) subblocks.

(2) Each sub block with a top left sample coordinated at (x, y) fetchesthe corresponding luma block covering the same top-left sample which iscoordinated at (2x, 2y).

(3) The encoder checks the block vector(bv) of the fetched luma block.If one of the following conditions is satisfied, the by is considered asinvalid.

-   -   a. A by of the corresponding luma block is not existing.    -   b. The prediction block identified by a by is not reconstructed        yet.    -   c. The prediction block identified by a by is partially or fully        overlapped with the current block.

(4) The chroma motion vector of a sub block is set to the motion vectorof the corresponding luma sub block.

The IBC mode is allowed at the encoder when all sub blocks find a validby.

2.3.2 Recent Progress for IBC

2.3.2.1 Single BV List

In some embodiments, the BV predictors for merge mode and AMVP mode inIBC share a common predictor list, which consist of the followingelements:

(1) 2 spatial neighboring positions (A1, B1 as in FIG. 2 )

(2) 5 HMVP entries

(3) Zero vectors by default

The number of candidates in the list is controlled by a variable derivedfrom the slice header. For merge mode, up to first 6 entries of thislist can be used; for AMVP mode, the first 2 entries of this list can beused. And the list conforms with the shared merge list regionrequirement (shared the same list within the SMR).

In addition to the above-mentioned BV predictor candidate list, thepruning operations between HMVP candidates and the existing mergecandidates (A1, B1) can be simplified. In the simplification there willbe up to 2 pruning operations since it only compares the first HMVPcandidate with spatial merge candidate(s).

2.3.2.2 Size Restriction of IBC

In some embodiments, syntax constraint for disabling 128×128 IBC modecan be explicitly used on top of the current bitstream constraint in theprevious VTM and VVC versions, which makes presence of IBC flagdependent on CU size<128×128.

2.3.2.3 Shared Merge List for IBC

To reduce the decoder complexity and support parallel encoding, in someembodiments, the same merging candidate list for all leaf coding units(CUs) of one ancestor node in the CU split tree can be shared forenabling parallel processing of small skip/merge-coded CUs. The ancestornode is named merge sharing node. The shared merging candidate list isgenerated at the merge sharing node pretending the merge sharing node isa leaf CU.

More specifically, the following may apply:

-   -   If the block has luma samples no larger than 32, and split to 2        4×4 child blocks, sharing merge lists between very small blocks        (e.g. two adjacent 4×4 blocks) is used.    -   If the block has luma samples larger than 32, however, after a        split, at least one child block is smaller than the threshold        (32), all child blocks of that split share the same merge list        (e.g. 16×4 or 4×16 split ternary or 8×8 with quad split).

Such a restriction is only applied to IBC merge mode.

3. Problems Solved by Embodiments

One block may be coded with the IBC mode. However, different sub-regionswithin the block may be with different content. How to further explorethe correlation to the previously coded blocks within current frameneeds to be studied.

4. Examples of Embodiments

In this document, intra block copy (IBC) may not be limited to thecurrent IBC technology, but may be interpreted as the technology thatusing the reference samples within the currentslice/tile/brick/picture/other video unit (e.g., CTU row) excluding theconventional intra prediction methods.

To solve the problem mentioned above, sub-block-based IBC (sbIBC) codingmethod is proposed. In sbIBC, a current IBC-coded video block (e.g.,CU/PU/CB/PB) is divided into a plurality of sub-blocks. Each of thesub-blocks may have a size smaller than a size of the video block. Foreach respective sub-block from the plurality of sub-blocks, the videocoder may identify a reference block for the respective sub-block incurrent picture/slice/tile/brick/tile group. The video coder may usemotion parameters of the identified reference block for the respectivesub-block to determine motion parameters for the respective sub-block.

In addition, it is not restricted that IBC only is applied touni-prediction coded blocks. Bi-prediction may be also supported withboth two reference pictures are the current picture. Alternatively,bi-prediction with one from the current picture and the other one from adifferent picture may be supported as well. In yet another example,multiple hypothesis may be also applied.

The listing below should be considered as examples to explain generalconcepts. These techniques should not be interpreted in a narrow way.Furthermore, these techniques can be combined in any manner. Neighboringblocks A0, A1, B0, B1, and B2 are shown in FIG. 2 .

-   1. In sbIBC, one block with size equal to M×N may be split to more    than one sub-block.    -   a. In one example, the sub-block size is fixed to be L×K, e.g.,        L=K=4.    -   b. In one example, the sub-block size is fixed to be the minimum        coding unit/prediction unit/transform unit/the unit for motion        information storage.    -   c. In one example, one block may be split to multiple sub-blocks        with different sizes or with equal sizes.    -   d. In one example, indication of the sub-block size may be        signaled.    -   e. In one example, indication of the sub-block size may be        changed from block to block, e.g., according to block        dimensions.    -   f. In one example, the sub-block size must be in a form of        (N1×minW)×(N2×minH), wherein minW×minH represents the minimum        coding unit/prediction unit/transform unit/the unit for motion        information storage, and N1 and N2 are positive integers.    -   g. In one example, the sub-block dimensions may depend on the        color formats and/or color components.        -   i. For example, the sub-block sizes for different color            components may be different.            -   1) Alternatively, sub-block sizes for different color                components may be the same.        -   ii. For example, a 2L×2K sub-block of the luma component may            correspond to a L×K sub-block of a chroma component when the            color format is 4:2:0.            -   1) Alternatively, four 2L×2K sub-block of the luma                component may correspond to a 2L×2K sub-block of a                chroma component when the color format is 4:2:0.        -   iii. For example, a 2L×2K sub-block of the luma component            may correspond to a 2L×K sub-block of a chroma component            when the color format is 4:2:2.            -   1) Alternatively, Two 2L×2K sub-block of the luma                component may correspond to a 2L×2K sub-block of a                chroma component when the color format is 4:2:2.        -   iv. For example, a 2L×2K sub-block of the luma component may            correspond to a 2L×2K sub-block of a chroma component when            the color format is 4:4:4.    -   h. In one example, the MV of a sub-block of a first color        component may be derived from one corresponding sub-block or        plurality of corresponding sub-blocks of a second color        component.        -   i. For example, the MV of a sub-block of a first color            component may be derived as the average MV of the plurality            of corresponding sub-blocks of a second color component.        -   ii. Alternatively, furthermore, the above methods may be            applied when single tree is utilized.        -   iii. Alternatively, furthermore, the above methods may be            applied when for certain block sizes, such as 4x4 chroma            blocks.    -   i. In one example, the sub-block size may be dependent on the        coded mode, such as IBC merge/AMVP mode.    -   j. In one example, the sub-block may be non-rectangular, such as        triangular/wedgelet.-   2. Two stages, including the identification of a corresponding    reference block with an initialized motion vector (denoted as    initMV) and the derivation of one or multiple motion vectors for a    sub-CU according to the reference block, are utilized to obtain the    motion information of a sub-CU, at least one reference picture of    which is equal to the current picture.    -   a. In one example, the reference block may be in the current        picture.    -   b. In one example, the reference block may be in a reference        picture.        -   i. For example, it may be in the collocated reference            picture.        -   ii. For example, it may be in a reference picture identified            by using the motion information of the collocated block or            neighboring blocks of the collocated block.            Stage 1.a on Settings of initMV (vx, vy)    -   c. In one example, the initMV may be derived from one or        multiple neighboring blocks (adjacent or non-adjacent) of the        current block or current sub-block.        -   i. The neighboring block can be one in the same picture.            -   1) Alternatively, it can be one in a reference picture.                -   a. For example, it may be in the collocated                    reference picture.                -   b. For example, it may be identified by using the                    motion information of the collocated block or                    neighboring blocks of the collocated block.        -   ii. In one example, it may be derived from a neighbouring            block Z.            -   1) For example, initMV may be set equal to a MV stored                in the neighbouring block Z. E.g., neighbouring block Z                may be block A1.        -   iii. In one example, it may be derived from multiple blocks            checked in order.            -   1) In one example, the first identified motion vector                associated with the current picture as a reference                picture from the checked blocks may be set to be the                initMV.    -   d. In one example, the initMV may be derived from a motion        candidate list.        -   i. In one example, it may be derived from the k-th (e.g.,            1^(st)) candidate in the IBC candidate list.            -   1) In one example, the IBC candidate list is the                merge/AMVP candidate list.            -   2) In one example, the IBC candidate list different from                the existing IBC merge candidate list construction                process may be utilized, such as using different spatial                neighboring blocks.                -   ii. In one example, it may be derived from the k-th                    (e.g., 1^(st)) candidate in the IBC HMVP table.    -   e. In one example, it may be derived based on the current        block's position.    -   f. In one example, it may be derived depending on the current        block's dimensions.    -   g. In one example, it may be set to default values.    -   h. In one example, indications of the initMV may be signaled in        a video unit level, such as tile/slice/picture/brick/CTU        row/CTU/CTB/CU/PU/TU etc. al.    -   i. The initial MV may be different for two different sub-blocks        within current block.    -   j. how to derive the initial MV may be changed from block to        block, from tile to tile, from slice to slice, etc. al.        Stage 1.b on Identification of Corresponding Reference Block of        a sub-CU Using initMV    -   k. In one example, the initMV may be firstly converted to 1-pel        integer precision and the converted MV may be utilized to        identify the corresponding block of a sub-block. Denote the        converted MV denoted by (vx′, vy′).        -   i. In one example, if (vx, vy) are in the F-pel inter            precision, the converted MV denoted by (vx′, vy′) may be set            to (vx *F, vy *F) (e.g., F=2 or 4).        -   ii. Alternatively, (vx′, vy′) is directly set equal to (vx,            vy).    -   l. Suppose the top-left position of one sub-block is (x, y) and        sub-block size is K×L. The corresponding block of the sub-block        is set to the CU/coding block (CB)/PU/PB covering the coordinate        (x+offsetX+vx′, y+offsetY+vy′) wherein offsetX and offsetY are        utilized to indicate the selected coordinate relative to current        sub-block.        -   i. In one example, offsetX and/or offsetY are set to 0.        -   ii. In one example, offsetX may be set to (L/2) or (L/2+1)            or (L/2−1) wherein L may be the sub-block' width.        -   iii. In one example, offsetY may be set to (K/2) or (K/2+1)            or (K/2−1) wherein K may be the sub-block' height.        -   iv. Alternatively, the horizontal and/or vertical offset may            be further clipped to a range, such as within            picture/slice/tile/brick boundary/IBC reference area etc.            al.            Stage 2 on Derivation of Sub-Block's Motion Vector (Denoted            by subMV (subMVx, subMVy) Using Motion Information of the            Identified Corresponding Reference Block    -   m. A subMV of a sub-block is derived from the motion information        of the corresponding block.        -   i. In one example, if the corresponding block has a motion            vector pointing to the current picture, subMV is set equal            to the MV.        -   ii. In one example, if the corresponding block has a motion            vector pointing to the current picture, subMV is set equal            to the MV plus the initMV.    -   n. The derived subMV may be further clipped to a given range or        clipped to make sure it is pointing to the IBC reference area.    -   o. In a conformance bit-stream, the derived subMV must be a        valid MV of IBC for the sub-block.-   3. One or multiple IBC candidates with sub-block motion vectors may    be generated, which may be denoted as sub-block IBC candidates.-   4. A sub-block IBC candidate may be inserted to the sub-block merge    candidate which include ATMVP, affine merge candidates.    -   a. In one example, it may be added before all other sub-block        merge candidates.    -   b. In one example, it may be added after the ATMVP candidate.    -   c. In one example, it may be added after the inherited affine        candidates or the constructed affine candidate.    -   d. In one example, it may be added to the IBC merge/AMVP        candidate list        -   i. Alternatively, whether to add it may depend on the mode            information of current block. For example, if it is IBC AMVP            mode, it may not be added.    -   e. Which candidate list to be added may depend on the        partitioning structure, e.g., dual tree or single tree.    -   f. Alternatively, multiple sub-block IBC candidates may be        inserted to the sub-block merge candidate.-   5. IBC sub-block motion (e.g., AMVP/merge) candidate list may be    constructed with at least one sub-block IBC candidate.    -   a. Alternatively, one or multiple sub-block IBC candidates may        be inserted to the IBC sub-block merge candidate, e.g., using        different initialized MVs.    -   b. Alternatively, furthermore, whether to construct the IBC        sub-block motion candidate list or the existing IBC AMVP/merge        candidate list may be signaled by an indicator, or derived        on-the-fly.    -   c. Alternatively, furthermore, an index to the IBC sub-block        merge candidate list may be signaled if current block is coded        with IBC merge mode.    -   d. Alternatively, furthermore, an index to the IBC sub-block        AMVP candidate list may be signaled if current block is coded        with IBC AMVP mode.        -   i. Alternatively, furthermore, the signaled/derived MVD for            the IBC AMVP mode may be applied to one or multiple            sub-blocks.-   6. The reference block of a sub-block and the sub-block may belong    to the same color component.    Extended of sbIBC by Mixed Usage of Other Tools Applied to Different    Sub-Blocks in the Same Block-   7. One block may be split to multiple sub-blocks with at least one    coded with IBC and at least one coded with intra mode.    -   a. In one example, for a sub-block, a motion vector may not be        derived. Instead, one or multiple intra prediction modes may be        derived for a sub-block.    -   b. Alternatively, palette mode or/and palette table may be        derived.    -   c. In one example, one intra prediction mode may be derived for        the entire block.-   8. One block may be split to multiple sub-blocks with all sub-blocks    coded with intra mode.-   9. One block may be split to multiple sub-blocks with all sub-blocks    coded with palette mode.-   10. One block may be split to multiple sub-blocks with at least one    sub-block coded with IBC mode and at least one coded with palette    mode.-   11. One block may be split to multiple sub-blocks with at least one    sub-block coded with intra mode and at least one coded with palette    mode.-   12. One block may be split to multiple sub-blocks with at least one    sub-block coded with IBC mode and at least one coded with inter    mode.-   13. One block may be split to multiple sub-blocks with at least one    sub-block coded with intra mode and at least one coded with inter    mode.    Interactions with Other Tools-   14. When one or multiple of the above methods are applied, the IBC    HMVP table may not be updated.    -   a. Alternatively, one or multiple of the motion vectors for        IBC-coded sub-regions may be used to update the IBC HMVP table.-   15. When one or multiple of the above methods are applied, the    non-IBC HMVP table may not be updated.    -   b. Alternatively, one or multiple of the motion vectors for        inter-coded sub-regions may be used to update the non-IBC HMVP        table.-   16. The in-loop filtering process (e.g., deblocking procedure) may    depend on the usage of above methods.    -   a. In one example, sub-blocks boundary may be filtered when one        or multiple of the above methods are applied.        -   a. Alternatively, sub-blocks boundary may be filtered when            one or multiple of the above methods are applied.    -   b. In one example, blocks coded with above methods may be        treated in a similar way as the conventional IBC coded blocks.-   17. Certain coding methods (e.g., sub-block transform, affine motion    prediction, multiple reference line intra prediction, matrix-based    intra prediction, symmetric MVD coding, merge with MVD decoder side    motion derivation/refinement, bi-directional optimal flow, reduced    secondary transform, multiple transform set, etc.) may be disabled    for blocks coded with one or multiple of the above methods.-   18. Indication of usage of the above methods and/or sub-block sizes    may be signaled in sequence/picture/slice/tile    group/tile/brick/CTU/CTB/CU/PU/TU/other video unit-level or derived    on-the-fly.    -   a. In one example, one or multiple of the above method may be        treated as a special IBC mode.        -   i. Alternatively, furthermore, if one block is coded as IBC            mode, further indications of using conventional whole-block            based IBC method or sbIBC may be signaled or derived.        -   ii. In one example, the subsequent IBC-coded blocks may            utilize the motion information of the current sbIBC-coded            block as a MV predictor.            -   1. Alternatively, the subsequent IBC-coded blocks may be                disallowed to utilize the motion information of the                current sbIBC-coded block as a MV predictor.    -   b. In one example, sbIBC may be indicated by a candidate index        to a motion candidate list.        -   i. In one example, a specific candidate index is assigned to            a sbIBC coded block.    -   c. In one example, the IBC candidate may be classified into two        categories: one for whole block coding, and the other for        sub-block coding. Whether one block is coded with the sbIBC mode        may depend on the category of an IBC candidate.

Usage of the Tools

-   19. Whether and/or how to apply the above methods may depend on the    following information:    -   a. A message signaled in the dependency parameter set        (DPS)/sequence parameter set (SPS)/video parameter set        (VPS)/picture parameter set (PPS)/adaptation parameter set        (APS)/picture header/slice header/tile group header/Largest        coding unit (LCU)/Coding unit (CU)/LCU row/group of LCUs/TU/PU        block/Video coding unit    -   b. Position of CU/PU/TU/block/Video coding unit    -   c. Block dimension of current block and/or its neighboring        blocks    -   d. Block shape of current block and/or its neighboring blocks    -   e. The intra mode of the current block and/or its neighboring        blocks    -   f. The motion/block vectors of its neighboring blocks    -   g. Indication of the color format (such as 4:2:0, 4:4:4)    -   h. Coding tree structure    -   i. Slice/tile group type and/or picture type    -   j. Color component (e.g. may be only applied on chroma        components or luma component)    -   k. Temporal layer ID    -   l. Profiles/Levels/Tiers of a standard

Ideas Related to Merge List Construction Process and IBC Usage

-   20. IBC mode may be used together with inter prediction mode for    blocks in inter-coded pictures/slices/tile groups/tiles.    -   a. In one example, for IBC AMVP mode, syntax elements may be        signaled to indicate whether the current block is predicted both        from the current picture and a reference picture not identical        to the current picture (denoted as a temporal reference        picture).        -   i. Alternatively, furthermore, if the current block is also            predicted from a temporal reference picture, syntax elements            may be signaled to indicate which temporal reference picture            is used and its associated MVP index, MVD, MV precision etc.        -   ii. In one example, for IBC AMVP mode, one reference picture            list may only include the current picture, and the other            reference picture list may only include temporal reference            pictures.    -   b. In one example, for IBC merge mode, motion vectors and        reference pictures may be derived from neighboring blocks.        -   i. For example, if a neighboring block is only predicted            from the current picture, then the derived motion            information from the neighbouring block may only refer to            the current picture.        -   ii. For example, if a neighboring block is predicted both            from the current picture and a temporal reference picture,            then the derived motion information may refer to both the            current picture and a temporal reference picture.            -   1) Alternatively, the derived motion information may                only refer to the current picture.        -   iii. For example, if a neighboring block is predicted only            from a temporal reference pictures, it may be considered as            “invalid” or “unavailable” when constructing IBC merge            candidates.    -   c. In one example, fixed weighting factor may be assigned to        reference blocks from current picture and reference blocks from        temporal reference picture for bi-prediction.        -   i. Alternatively, furthermore, the weighting factor may be            signaled.-   21. The motion candidate list construction process (e.g., regular    merge list, IBC merge/AMVP list, sub-block merge list, IBC sub-block    candidate list) and/or whether to/how to update HMVP tables may    depend on the block dimensions and/or merge sharing conditions.    Denote a block's width and height as W and H, respectively.    Condition C may depend on block dimension and/or coded information.    -   a. The motion candidate list construction process (e.g., regular        merge list, IBC merge/AMVP list, sub-block merge list, IBC        sub-block candidate list) and/or whether to/how to update HMVP        tables may depend on condition C.    -   b. In one example, condition C may depend on the coded        information of current block and/or its neighboring (adjacent or        non-adjacent) blocks.    -   c. In one example, condition C may depend on the merge sharing        conditions.    -   d. In one example, condition C may depend on the block dimension        of current block, and/or block dimension of neighboring        (adjacent or non-adjacent) blocks and/or coded modes of current        and/or neighboring blocks.    -   e. In one example, derivation of spatial merge candidates is        skipped if condition C is satisfied.    -   f. In one example, derivation of candidates from spatial        neighboring (adjacent or non-adjacent) blocks is skipped if        condition C is satisfied.    -   g. In one example, derivation of candidates from certain spatial        neighboring (adjacent or non-adjacent) blocks (e.g., block B2)        is skipped if condition C is satisfied.    -   h. In one example, derivation of HMVP candidates is skipped if        condition C is satisfied.    -   i. In one example, derivation of pairwise merge candidates is        skipped if condition C is satisfied.    -   j. In one example, number of maximum pruning operations is        reduced or set to 0 if condition C is satisfied.        -   i. Alternatively, furthermore, the pruning operations among            spatial merge candidates may be reduced or removed.        -   ii. Alternatively, furthermore, the pruning operations among            HMVP candidates and other merge candidates may be reduced or            removed.    -   k. In one example, updating of HMVP candidates is skipped if        condition C is satisfied.        -   i. In one example, HMVP candidates may be directly added to            motion list without being pruned.    -   l. In one example, default motion candidates (e.g., zero motion        candidate in IBC merge/AVMP list) is not added if condition C is        satisfied.    -   m. In one example, different checking order (e.g, from the first        to the last instead of from last to the first) and/or different        number of HMVP candidates to be checked/added when condition C        is satisfied.    -   n. In one example, condition C may be satisfied when W*H is        greater or no smaller than a threshold (e.g., 1024).    -   o. In one example, condition C may be satisfied when W and/or H        is greater or no smaller than a threshold (e.g., 32).    -   p. In one example, condition C may be satisfied when W is        greater or no smaller than a threshold (e.g., 32).    -   q. In one example, condition C may be satisfied when H is        greater or no smaller than a threshold (e.g., 32).    -   r. In one example, condition C may be satisfied when W*H is        greater or no smaller than a threshold (e.g., 1024) and current        block is coded with IBC AMVP and/or merge mode.    -   s. In one example, condition C may be satisfied when W*H is        smaller or no greater than a threshold (e.g., 16 or 32 or 64)        and current block is coded with IBC AMVP and/or merge mode.        -   i. Alternatively, furthermore, when condition C is            satisfied, the IBC motion list construction process may            include candidates from spatial neighboring blocks (e.g.,            A1, B1) and default candidates. That is, insertion of HMVP            candidates is skipped.        -   ii. Alternatively, furthermore, when condition C is            satisfied, the IBC motion list construction process may            include candidates from HMVP candidates from the IBC HMVP            table and default candidates. That is, insertion of            candidates from spatial neighboring blocks is skipped.        -   iii. Alternatively, furthermore, the updating of IBC HMVP            tables is skipped after decoding a block with condition C            satisfied.        -   iv. Alternatively, condition C may be satisfied when            one/some/all of the following cases are true:            -   1) When W*H is equal to or no greater than T1 (e.g., 16)                and current block is coded with IBC AMVP and/or merge                mode            -   2) When W is equal to T2 and H is equal to T3 (e.g.,                T2=4, T3=8), its above block is available and size equal                to A×B; and both current block and its above block are                coded with a certain mode                -   a. Alternatively, when W is equal to T2 and H is                    equal to T3 (e.g., T2=4, T3=8), its above block is                    available, in the same CTU and size equal to A×B,                    and both current block and its above block are coded                    with the same mode                -   b. Alternatively, when W is equal to T2 and H is                    equal to T3 (e.g., T2=4, T3=8), its above block is                    available and size equal to A×B, and both current                    block and its above block are coded with the same                    mode                -   c. Alternatively, when W is equal to T2 and H is                    equal to T3 (e.g., T2=4, T3=8), its above block is                    unavailable                -   d. Alternatively, when W is equal to T2 and H is                    equal to T3 (e.g., T2=4, T3=8), its above block is                    unavailable or above block is outside the current                    CTU            -   3) When W is equal to T4 and H is equal to T5 (e.g.,                T4=8, T5=4), its left block is available and size equal                to A×B; both current block and its left block are coded                with a certain mode                -   a. Alternatively, when W is equal to T4 and H is                    equal to T5 (e.g., T4=8, T5=4), its left block is                    unavailable            -   4) When W*H is no greater than T1 (e.g., 32), current                block is coded with IBC AMVP and/or merge mode; both its                above and left neighboring blocks are available, and                size equal to A×B, and are coded with a certain mode.                -   a. When W*H is no greater than T1 (e.g., 32),                    current block is coded with a certain mode; its left                    neighboring block is available, size equal to A×B                    and IBC coded; and its above neighboring block is                    available, within the same CTU and size equal to A×B                    and coded with the same mode.                -   b. When W*H is no greater than T1 (e.g., 32),                    current block is coded with a certain mode; its left                    neighboring block is unavailable; and its above                    neighboring block is available, within the same CTU                    and size equal to A×B and coded with the same mode.                -   c. When W*H is no greater than T1 (e.g., 32),                    current block is coded with a certain mode; its left                    neighboring block is unavailable; and its above                    neighboring block is unavailable.                -   d. When W*H is no greater than T1 (e.g., 32),                    current block is coded with a certain mode; its left                    neighboring block is available, size equal to A×B                    and coded with same mode; and its above neighboring                    block is unavailable.                -   e. When W*H is no greater than T1 (e.g., 32),                    current block is coded with a certain mode; its left                    neighboring block is unavailable; and its above                    neighboring block is unavailable or outside the                    current CTU.                -   f. When W*H is no greater than T1 (e.g., 32),                    current block is coded with a certain mode; its left                    neighboring block is available, size equal to A×B                    and coded with same mode; and its above neighboring                    block is unavailable or outside the current CTU.            -   5) In above examples, the ‘certain mode’ is the IBC                mode.            -   6) In above examples, the ‘certain mode’ is the Inter                mode.            -   7) In above examples, the ‘A×B’ may be set to 4×4.            -   8) In above examples, ‘the neighboring block size equal                to A×B’ may be replaced by ‘the neighboring block size                is no greater than or no smaller than A×B’.            -   9) In above examples, above and left neighboring blocks                are the two which are accessed for spatial merge                candidate derivation.                -   a. In one example, suppose the coordinate of the                    top-left sample in current block is (x, y), the left                    block is the one covering (x−1, y+H−1).                -   b. In one example, suppose the coordinate of the                    top-left sample in current block is (x, y), the left                    block is the one covering (x+W−1, y−1).    -   t. The thresholds mentioned above may be pre-defined or        signaled.        -   i. Alternatively, furthermore, the thresholds may be            dependent on coding information of a block, such as coded            mode.    -   u. In one example, condition C is satisfied when the current        block is under a shared node and current block is coded with IBC        AMVP and/or merge mode.        -   i. Alternatively, furthermore, when condition C is            satisfied, the IBC motion list construction process may            include candidates from spatial neighboring blocks (e.g.,            A1, B1) and default candidates. That is, insertion of HMVP            candidates is skipped.        -   ii. Alternatively, furthermore, when condition C is            satisfied, the IBC motion list construction process may            include candidates from HMVP candidates from the IBC HMVP            table and default candidates. That is, insertion of            candidates from spatial neighboring blocks is skipped.        -   iii. Alternatively, furthermore, the updating of IBC HMVP            tables is skipped after decoding a block with condition C            satisfied.    -   v. In one example, the condition C may be adaptively changed,        such as according to coding information of a block.        -   i. In one example, condition C may be defined based on the            coded mode (IBC or non-IBC mode), block dimension.    -   w. Whether to apply the above methods may depend on the coding        information of a block, such as whether it is IBC coded block or        not.        -   i. In one example, when the block is IBC coded, the above            method may be applied.            IBC motion list-   22. It is proposed that motion candidates in IBC HMVP tables are    stored in integer pel precision instead of 1/16-pel precision.    -   a. In one example, all the motion candidates are stored in 1-pel        precision.    -   b. In one example, when using the motion information from        spatial neighboring (adjacent or non-adjacent) blocks, and/or        from IBC HMVP tables, rounding process of MVs are skipped.-   23. It is proposed that the IBC motion list may only contain motion    candidates from one or more IBC HMVP tables.    -   a. Alternatively, furthermore, the signaling of a candidate in        the IBC motion list may depend on the number of available HMVP        candidates in a HMVP table.    -   b. Alternatively, furthermore, the signaling of a candidate in        the IBC motion list may depend on the maximum number of HMVP        candidates in a HMVP table.    -   c. Alternatively, the HMVP candidates in the HMVP tables are        added to the list in order without pruning.        -   i. In one example, the order is based on the ascending order            of entry index to the tables.        -   ii. In one example, the order is based on the descending            order of entry index to the tables.        -   iii. In one example, the first N entries in the table may be            skipped.        -   iv. In one example, the last N entries in the table may be            skipped.        -   v. In one example, an entry with invalid BV(s) may be            skipped.        -   vi.    -   d. Alternatively, furthermore, motion candidates derived from        the HMVP candidates from one or multiple HMVP tables may be        further modified, such as by adding an offset to the horizonal        vector and/or adding an offset to the vertical vector.        -   i. An HMVP candidate with invalid BV(s) may be modified to            provide valid BV(s).    -   e. Alternatively, furthermore, default motion candidates may be        added after or before one or multiple HMVP candidates.    -   f. How to/whether to add HMVP candidates into an IBC motion list        may depend on the dimensions of the block.        -   i. For example, the IBC motion list may only contain motion            candidates from one or multiple HMVP tables when the the            block dimensions (W and H representing width and height)            satisfy a condition C.            -   1) In one example, condition C is W<=T1 and H<=T2, e.g.                T1=T2=4.            -   2) In one example, condition C is W<=T1 or H<=T2, e.g.                T1=T2=4.            -   3) In one example, condition C is W*H<=T, e.g. T=16.

5. Embodiments

The added changes are highlighted in underlined bold faced italics. Thedeletions are marked with [[ ]].

5.1 Embodiment #1

No update of HMVP tables when current block is under the shared node.And only use a single IBC HMVP table for blocks under the shared node.

7.4.8.5 Coding Unit Semantics

[[When all the following conditions are true, the history-based motionvector predictor list for the shared merging candidate list region isupdated by setting NumHmvpSmrIbcCand equal to NumHmvpIbcCand, andsetting HmvpSmrIbcCandList[i] equal to HmvpIbcCandList[i] for i=0 . . .NumHmvpIbcCand−1:

-   -   IsInSmr[x0][y0] is equal to TRUE.    -   SmrX[x0][y0] is equal to x0.    -   SmrY[x0][y0] is equal to y0.]]

8.6.2 Derivation Process for Motion Vector Components for IBC Blocks8.6.2.1 General

Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are:

-   -   the luma motion vector in 1/16 fractional-sample accuracy mvL.

The luma motion vector mvL is derived as follows:

-   -   The derivation process for IBC luma motion vector prediction as        specified in clause 8.6.2.2 is invoked with the luma location        (xCb, yCb), the variables cbWidth and cbHeight inputs, and the        output being the luma motion vector mvL.    -   When general_merge_flag[xCb][yCb] is equal to 0, the following        applies:        -   1. The variable mvd is derived as follows:

mvd[0]=MvdL0[xCb][yCb][0]  (8-883)

mvd[1]=MvdL0[xCb][yCb][1]  (8-884)

-   -   -   2. The rounding process for motion vectors as specified in            clause 8.5.2.14 is invoked with mvX set equal to mvL,            rightShift set equal to MvShift+2, and leftShift set equal            to MvShift+2 as inputs and the rounded mvL as output.        -   3. The luma motion vector mvL is modified as follows:

u[0]=(mvL[0]+mvd[0]+2¹⁸)% 2¹⁸   (8-885)

mvL[0]=(u[0]>=2¹⁷) ? (u[0]−2¹⁸):u[0]  (8-886)

u[1]=(mvL[1]+mvd[1]+2¹⁸)%2¹⁸   (8-887)

mvL[1]=(u[1]>=2¹⁷) ? (u[1]−2¹⁸):u[1]  (8-888)

-   -   -   -   NOTE 1—The resulting values of mvL[0] and mvL[1] as                specified above will always be in the range of −2¹⁷ to                2¹⁷−1, inclusive.

When IsInSmr[xCb][yCb] is false, The updating process for thehistory-based motion vector predictor list as specified in clause8.6.2.6 is invoked with luma motion vector mvL.

The top-left location inside the reference block (xRefTL, yRefTL) andthe bottom-right location inside the reference block (xRefBR, yRefBR)are derived as follows:

(xRefTL, yRefTL)=(xCb+(mvL[0]>>4), yCb+(mvL[1]>>4))   (8-889)

(xRefBR, yRefBR)=(xRefTL +cbWidth−1, yRefTL+cbHeight−1)   (8-890)

It is a requirement of bitstream conformance that the luma motion vectormvL shall obey the following constraints:

8.6.2.4 Derivation Process for IBC History-Based Motion VectorCandidates

Inputs to this process are:

-   -   a motion vector candidate list mvCandList,    -   the number of available motion vector candidates in the list        numCurrCand.

Outputs to this process are:

-   -   the modified motion vector candidate list mvCandList,    -   [[a variable isInSmr specifying whether the current coding unit        is inside a shared merging candidate region,]]    -   the modified number of motion vector candidates in the list        numCurrCand.

The variables isPrunedAi and isPrunedBi are set both equal to FALSE.

The array smrHmvplbcCandList and the variable smrNumHmvpIbcCand arederived as follows:

[[smr]]HmvpIbcCandList=[[isInSmr ? HmvpSmrIbcCandList:]] HmvpIbcCandList  (8-906)

[[smr]]NumHmvpIbcCand=[[isInSmr ? NumHmvpSmrIbcCand:]] NumHmvpIbcCand  (8-907)

For each candidate in smrHmvpIbcCandList[hMvpIdx] with index hMvpIdx=1 .. . [[smr]]NumHmvpIbcCand, the following ordered steps are repeateduntil numCurrCand is equal to MaxNumMergeCand:

-   -   1. The variable sameMotion is derived as follows:        -   If all of the following conditions are true for any motion            vector candidate N with N being A₁ or B₁, sameMotion and            isPrunedN are both set equal to TRUE:            -   hMvpIdx is less than or equal to 1.            -   The candidate                [[smr]]HmvpIbcCandList[[[smr]]NumHmvpIbcCand−hMvpIdx] is                equal to the motion vector candidate N.            -   isPrunedN is equal to FALSE.        -   Otherwise, sameMotion is set equal to FALSE.    -   2. When sameMotion is equal to FALSE, the candidate        [[smr]]HmvpIbcCandList[[[smr]]NumHmvpIbcCand−hMvpIdx] is added        to the motion vector candidate list as follows:

mvCandList[numCurrCand++]=[[smr]]HmvpIbcCandList[[[smr]]NumHmvpIbcCand−hMvpIdx]  (8-908)

5.2 Embodiment #2

Remove checking of spatial merge/AMVP candidates in the IBC motion listconstruction process when block size satisfies certain conditions, suchas Width*Height<K. In the following description, the threshold K can bepre-defined, as such 16.

7.4.8.2 Coding Tree Unit Semantics

The CTU is the root node of the coding tree structure.

[[The array IsInSmr[x][y] specifying whether the sample at (x, y) islocated inside a shared merging candidate list region, is initialized asfollows for x=0 . . . CtbSizeY−1 and y=0 . . . CtbSizeY−1:

IsInSmr[x][y]=FALSE   (7-96)]]

7.4.8.4 Coding Tree Semantics

[[When all of the following conditions are true, IsInSmr[x][y] is setequal to TRUE for x=x0 . . . x0+cbWidth−1 and y=y0 . . . y0+cbHeight−1:

-   -   IsInSmr[x0][y0] is equal to FALSE    -   cbWidth*cbHeight/4 is less than 32    -   treeType is not equal to DUAL_TREE_CHROMA

When IsInSmr[x0][y0] is equal to TRUE. the arrays SmrX[x][y],SmrY[x][y], SmrW[x][y] and SmrH[x][y] are derived as follows for x=x0 .. . x0+cbWidth−1 and y=y0 . . . y0+cbHeight−1:

SmrX[x][y]=x0   (7-98)

SmrY[x][y]=y0   (7-99)

SmrW[x][y]=cbWidth   (7-100)

SmrH[x][y]=cbHeight   (7-101)

When all of the following conditions are true, IsInSmr[x][y] is setequal to TRUE for x=x0 . . . x0+cbWidth−1 and y=y0 . . . y0+cbHeight−1:

-   -   IsInSmr[x0][y0] is equal to FALSE    -   One of the following conditions is true:        -   mtt_split_cu_binary_flag is equal to 1 and            cbWidth*cbHeight/2 is less than 32        -   mtt_split_cu_binary_flag is equal to 0 and            cbWidth*cbHeight/4 is less than 32    -   treeType is not equal to DUAL_TREE_CHROMA

When IsInSmr[x0][y0] is equal to TRUE. the arrays SmrX[x][y],SmrY[x][y], SmrW[x][y] and SmrH[x][y] are derived as follows for x=x0 .. . x0+cbWidth−1 and y=y0 . . . y0+cbHeight−1:

SmrX[x][y]=x0   (7-102)

SmrY[x][y]=y0   (7-103)

SmrW[x][y]=cbWidth   (7-104)

SmrH[x][y]=cbHeight   (7-105)]]

7.4.8.5 Coding Unit Semantics

[[When all the following conditions are true, the history-based motionvector predictor list for the shared merging candidate list region isupdated by setting NumHmvpSmrIbcCand equal to NumHmvpIbcCand, andsetting HmvpSmrIbcCandList[i] equal to HmvpIbcCandList[i] for i=0 . . .NumHmvpIbcCand−1:

-   -   IsInSmr[x0][y0] is equal to TRUE.    -   SmrX[x0][y0] is equal to x0.    -   SmrY[x0][y0] is equal to y0.]]

The following assignments are made for x=x0 . . . x0+cbWidth−1 and y=y0. . . y0+cbHeight−1:

CbPosX[x][y]=x0   (7-106)

CbPosY[x][y]=y0   (7-107)

CbWidth[x][y]=cbWidth   (7-108)

CbHeight[x][y]=cbHeight   (7-109)

8.6.2 Derivation Process for Motion Vector Components for IBC Blocks8.6.2.1 General

Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are:

-   -   the luma motion vector in 1/16 fractional-sample accuracy mvL.

The luma motion vector mvL is derived as follows:

-   -   The derivation process for IBC luma motion vector prediction as        specified in clause 8.6.2.2 is invoked with the luma location        (xCb, yCb), the variables cbWidth and cbHeight inputs, and the        output being the luma motion vector mvL.    -   When general_merge_flag[xCb][yCb] is equal to 0, the following        applies:        -   4. The variable mvd is derived as follows:

mvd[0]=MvdL0[xCb][yCb][0]  (8-883)

mvd[1]=MvdL0[xCb][yCb][1]  (8-884)

-   -   -   5. The rounding process for motion vectors as specified in            clause 8.5.2.14 is invoked with mvX set equal to mvL,            rightShift set equal to MvShift+2, and leftShift set equal            to MvShift+2 as inputs and the rounded mvL as output.        -   6. The luma motion vector mvL is modified as follows:

u[0]=(mvL[0]+mvd[0]+2¹⁸)%2¹⁸   (8-885)

mvL[0]=(u[0]>=2¹⁷) ? (u[0]−2¹⁸):u[0]  (8-886)

u[1]=(mvL[1]+mvd[1]+2¹⁸)%2¹⁸   (8-887)

mvL[1]=(u[1]>=2¹⁷) ? (u[1]−2¹⁸):u[1]  (8-888)

-   -   -   -   NOTE 1—The resulting values of mvL[0] and mvL[1] as                specified above will always be in the range of −2¹⁷ to                2¹⁷−1, inclusive.

The updating process for the history-based motion vector predictor listas specified in clause 8.6.2.6 is invoked with luma motion vector mvL.

The top-left location inside the reference block (xRefTL, yRefTL) andthe bottom-right location inside the reference block (xRefBR, yRefBR)are derived as follows:

(xRefTL, yRefTL)=(xCb+(mvL[0]>>4), yCb+(mvL[1]>>4))   (8-889)

(xRefBR, yRefBR)=(xRefTL+cbWidth−1, yRefTL+cbHeight−1)   (8-890)

It is a requirement of bitstream conformance that the luma motion vectormvL shall obey the following constraints:

8.6.2.2 Derivation Process for IBC Luma Motion Vector Prediction

This process is only invoked when CuPredMode[xCb][yCb] is equal toMODE_IBC, where (xCb, yCb) specify the top-left sample of the currentluma coding block relative to the top-left luma sample of the currentpicture.

Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are:

-   -   the luma motion vectors in 1/16 fractional-sample accuracy mvL.

The variables xSmr, ySmr, smrWidth, smrHeight, and smrNumHmvplbcCand arederived as follows:

xSmr=[[IsInSmr[xCb][yCb] ? SmrX[xCb][yCb]:]] xCb   (8-895)

ySmr=[[IsInSmr[xCb][yCb] ? SmrY[xCb][yCb]:]] yCb   (8-896)

smrWidth=[[IsInSmr[xCb][yCb] ? SmrW[xCb][yCb]:]] cbWidth   (8-897)

smrHeight=[[IsInSmr[xCb][yCb] ? SmrH[xCb][yCb]:]] cbHeight   (8-898)

smrNumHmvpIbcCand=[[IsInSmr[xCb][yCb] ? NumHmvpSmrIbcCand:]]NumHmvpIbcCand   (8-899)

The luma motion vector mvL is derived by the following ordered steps:

-   -   1.        The derivation process for spatial motion vector candidates from        neighbouring coding units as specified in clause 8.6.2.3 is        invoked with the luma coding block location (xCb, yCb) set equal        to (xSmr, ySmr), the luma coding block width cbWidth, and the        luma coding block height cbHeight set equal to smrWidth and        smrHeight as inputs, and the outputs being the availability        flags availableFlagA₁, availableFlagB₁ and the motion vectors        mvA₁ and mvB₁.    -   2.        The motion vector candidate list, mvCandList, is constructed as        follows:

i=0

if(availableFlagA ₁) mvCandList [i++]=mvA ₁   (8-900)

if(availableFlagB _(i)) mvCandList [i++]=mvB ₁

-   -   3.        The variable numCurrCand is set equal to the number of merging        candidates in the mvCandList.    -   4. When numCurrCand is less than MaxNumMergeCand and        smrNumHmvpIbcCand is greater than 0, the derivation process of        IBC history-based motion vector candidates as specified in        8.6.2.4 is invoked with mvCandList, islnSmr set equal to        IsInSmr[xCb][yCb], and numCurrCand as inputs, and modified        mvCandList and numCurrCand as outputs.    -   5. When numCurrCand is less than MaxNumMergeCand, the following        applies until numCurrCand is equal to MaxNumMergeCand:        -   1. mvCandList[numCurrCand][0] is set equal to 0.        -   2. mvCandList[numCurrCand][1] is set equal to 0.        -   3. numCurrCand is increased by 1.    -   6. The variable mvIdx is derived as follows:

mvIdx=general_merge_flag[xCb][yCb] ?merge_idx[xCb][yCb]:mvp_l0_flag[xCb][yCb]   (8-901)

-   -   7. The following assignments are made:

mvL[0]=mergeCandList[mvIdx][0]  (8-902)

mvL[1]=mergeCandList[mvIdx][1]  (8-903)

8.6.2.4 Derivation Process for IBC History-Based Motion VectorCandidates

Inputs to this process are:

-   -   a motion vector candidate list mvCandList,    -   the number of available motion vector candidates in the list        numCurrCand.

Outputs to this process are:

-   -   the modified motion vector candidate list mvCandList,    -   [[a variable isInSmr specifying whether the current coding unit        is inside a shared merging candidate region,]]    -   the modified number of motion vector candidates in the list        numCurrCand.

The variables isPrunedA₁ and isPrunedB₁ are set both equal to FALSE.

The array smrHmvpIbcCandList and the variable smrNumHmvpIbcCand arederived as follows:

[[smr]]HmvpIbcCandList=[[isInSmr ? HmvpSmrIbcCandList:]] HmvpIbcCandList  (8-906)

smrNumHmvpIbcCand=[[isInSmr ? NumHmvpSmrIbcCand:]] NumHmvpIbcCand  (8-907)

For each candidate in [[smr]]HmvpIbcCandList[hMvpIdx] with indexhMvpIdx=1 . . . smrNumHmvpIbcCand, the following ordered steps arerepeated until numCurrCand is equal to MaxNumMergeCand:

-   -   1. The variable sameMotion is derived as follows:        -   If            all of the following conditions are true for any motion            vector candidate N with N being A₁ or B₁, sameMotion and            isPrunedN are both set equal to TRUE:            -   hMvpIdx is less than or equal to 1.            -   The candidate                [[smr]]HmvpIbcCandList[[[smr]]NumHmvpIbcCand−hMvpIdx] is                equal to the motion vector candidate N.            -   isPrunedN is equal to FALSE.        -   Otherwise, sameMotion is set equal to FALSE.    -   2. When sameMotion is equal to FALSE, the candidate        [[smr]]HmvpIbcCandList[smrNumHmvpIbcCand−hMvpIdx] is added to        the motion vector candidate list as follows:

mvCandList[numCurrCand++]=[[smr]]HmvpIbcCandList[[[smr]]NumHmvpIbcCand−hMvpIdx]  (8-908)

5.3 Embodiment #3

Remove checking of spatial merge/AMVP candidates in the IBC motion listconstruction process when block size satisfies certain conditions, suchas current block is under the shared node, and no update of HMVP tables.

8.6.2.2 Derivation Process for IBC Luma Motion Vector Prediction

This process is only invoked when CuPredMode[xCb][yCb] is equal toMODEJBC, where (xCb, yCb) specify the top-left sample of the currentluma coding block relative to the top-left luma sample of the currentpicture. Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are:

-   -   the luma motion vectors in 1/16 fractional-sample accuracy mvL.

The variables xSmr, ySmr, smrWidth, smrHeight, and smrNumHmvpIbcCand arederived as follows:

xSmr=[[IsInSmr[xCb][yCb] ? SmrX[xCb][yCb]:]] xCb   (8-895)

ySmr=[[IsInSmr[xCb][yCb] ? SmrY[xCb][yCb]:]] yCb   (8-896)

smrWidth=[[IsInSmr[xCb][yCb] ? SmrW[xCb][yCb]:]] cbWidth   (8-897)

smrHeight=[[IsInSmr[xCb][yCb] ? SmrH[xCb][yCb]:]] cbHeight   (8-898)

smrNumHmvpIbcCand=[[IsInSmr[xCb][yCb] ? NumHmvpSmrIbcCand:]]NumHmvpIbcCand   (8-899)

The luma motion vector mvL is derived by the following ordered steps:

-   -   1.        The derivation process for spatial motion vector candidates from        neighboring coding units as specified in clause 8.6.2.3 is        invoked with the luma coding block location (xCb, yCb) set equal        to (xSmr, ySmr), the luma coding block width cbWidth, and the        luma coding block height cbHeight set equal to smrWidth and        smrHeight as inputs, and the outputs being the availability        flags availableFlagA₁, availableFlagB₁ and the motion vectors        mvA₁ and mvB₁.    -   2.        The motion vector candidate list, mvCandList, is constructed as        follows:

i=0

if(availableFlagA ₁) mvCandList [i++]=mvA ₁   (8-900)

if(availableFlagB _(i)) mvCandList [i++]=mvB ₁

-   -   3.        The variable numCurrCand is set equal to the number of merging        candidates in the mvCandList.    -   4. When numCurrCand is less than MaxNumMergeCand and        smrNumHmvpIbcCand is greater than 0, the derivation process of        IBC history-based motion vector candidates as specified in        8.6.2.4 is invoked with mvCandList, islnSmr set equal to        IsInSmr[xCb][yCb], and numCurrCand as inputs, and modified        mvCandList and numCurrCand as outputs.    -   5. When numCurrCand is less than MaxNumMergeCand, the following        applies until numCurrCand is equal to MaxNumMergeCand:        -   1. mvCandList[numCurrCand][0] is set equal to 0.        -   2. mvCandList[numCurrCand][1] is set equal to 0.        -   3. numCurrCand is increased by 1.    -   6. The variable mvldx is derived as follows:

mvIdx=general_merge_flag[xCb][yCb] ?merge_idx[xCb][yCb]:mvp_l0_flag[xCb][yCb]   (8-901)

-   -   7. The following assignments are made:

mvL[0]=mergeCandList[mvIdx][0]  (8-902)

mvL[1]=mergeCandList[mvIdx][1]  (8-903)

8.6.2.4 Derivation Process for IBC History-Based Motion VectorCandidates

Inputs to this process are:

-   -   a motion vector candidate list mvCandList,    -   the number of available motion vector candidates in the list        numCurrCand.

Outputs to this process are:

-   -   the modified motion vector candidate list mvCandList,    -   [[a variable isInSmr specifying whether the current coding unit        is inside a shared merging candidate region,]]    -   the modified number of motion vector candidates in the list        numCurrCand.

The variables isPrunedAi and isPrunedBi are set both equal to FALSE.

The array smrHmvplbcCandList and the variable smrNumHmvpIbcCand arederived as follows:

[[smr]]HmvpIbcCandList=[[isInSmr ? HmvpSmrIbcCandList:]] HmvpIbcCandList  (8-906)

[[smr]]NumHmvpIbcCand=[[isInSmr ? NumHmvpSmrIbcCand:]] NumHmvpIbcCand  (8-907)

For each candidate in [[smr]]HmvpIbcCandList[hMvpIdx] with indexhMvpIdx=1 . . . [[smr]]NumHmvpIbcCand, the following ordered steps arerepeated until numCurrCand is equal to MaxNumMergeCand:

-   -   3. The variable sameMotion is derived as follows:        -   If            all of the following conditions are true for any motion            vector candidate N with N being A₁ or B₁, sameMotion and            isPrunedN are both set equal to TRUE:            -   hMvpIdx is less than or equal to 1.            -   The candidate                [[smr]]HmvpIbcCandList[[smr]]NumHmvpIbcCand−hMvpIdx] is                equal to the motion vector candidate N.            -   isPrunedN is equal to FALSE.        -   Otherwise, sameMotion is set equal to FALSE.    -   4. When sameMotion is equal to FALSE, the candidate        [[smr]]HmvpIbcCandList[[[smr]]NumHmvpIbcCand−hMvpIdx] is added        to the motion vector candidate list as follows:

mvCandList[numCurrCand++]=[[smr]]HmvpIbcCandList[[[smr]]NumHmvpIbcCand−hMvpIdx]  (8-908)

8.6.2 Derivation Process for Motion Vector Vomponents for IBC Blocks8.6.2.1 General

Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are:

-   -   the luma motion vector in 1/16 fractional-sample accuracy mvL.

The luma motion vector mvL is derived as follows:

-   -   The derivation process for IBC luma motion vector prediction as        specified in clause 8.6.2.2 is invoked with the luma location        (xCb, yCb), the variables cbWidth and cbHeight inputs, and the        output being the luma motion vector mvL.    -   When general_merge_flag[xCb][yCb] is equal to 0, the following        applies:        -   7. The variable mvd is derived as follows:

mvd[0]=MvdL0[xCb][yCb][0]  (8-883)

mvd[1]=MvdL0[xCb][yCb][1]  (8-884)

-   -   -   8. The rounding process for motion vectors as specified in            clause 8.5.2.14 is invoked with mvX set equal to mvL,            rightShift set equal to MvShift+2, and leftShift set equal            to MvShift+2 as inputs and the rounded mvL as output.        -   9. The luma motion vector mvL is modified as follows:

u[0]=(mvL[0]+mvd[0]+2¹⁸)%2¹⁸   (8-885)

mvL[0]=(u[0]>=2¹⁷) ? (u[0]−2¹⁸):u[0]  (8-886)

u[1]=(mvL[1]+mvd[1]+2¹⁸)% 2¹⁸   (8-887)

mvL[1]=(u[1]>=2¹⁷) ? (u[1]−2¹⁸):u[1]  (8-888)

-   -   -   -   NOTE 1—The resulting values of mvL[0] and mvL[1] as                specified above will always be in the range of −2¹⁷ to                2¹⁷−1, inclusive.

The updating process for the history-based motion vector predictor listas specified in clause 8.6.2.6 is invoked with luma motion vector mvL.

The top-left location inside the reference block (xRefTL, yRefTL) andthe bottom-right location inside the reference block (xRefBR, yRefBR)are derived as follows:

(xRefTL, yRefTL)=(xCb+(mvL[0]>>4), yCb+(mvL[1]>>4))   (8-889)

(xRefBR, yRefBR)=(xRefTL+cbWidth−1, yRefTL+cbHeight−1)   (8-890)

It is a requirement of bitstream conformance that the luma motion vectormvL shall obey the following constraints:

5.4 Embodiment #4

Remove checking of spatial merge/AMVP candidates in the IBC motion listconstruction process when block size satisfies certain conditions, suchas Width*Height<=K or Width=N, Height=4 and left neighboring block is4×4 and coded in IBC mode or Width=4, Height=N and above neighboringblock is 4×4 and coded in IBC mode, and no update of HMVP tables. In thefollowing description, the threshold K can be pre-defined, as such 16, Ncan be pre-defined, as such 8.

7.4.9.2 Coding Tree Unit Semantics

The CTU is the root node of the coding tree structure.

The array IsAvailable[cIdx][x][y] specifying whether the sample at (x,y) is available for use in the derivation process for neighbouring blockavailability as specified in clause 6.4.4 is initialized as follows forcIdx=0 . . . 2, x=0 . . . CtbSizeY−1, and y=0 . . . CtbSizeY−1:

IsAvailable[cIdx][x][y]=FALSE   (7-123)

[[The array IsInSmr[x][y] specifying whether the sample at (x, y) islocated inside a shared merging candidate list region, is initialized asfollows for x=0 . . . CtbSizeY−1 and y=0 . . . CtbSizeY−1:

IsInSmr[x][y]=FALSE   (7-124)]]

7.4.9.4 Coding Tree Semantics

[[When all of the following conditions are true, IsInSmr[x][y] is setequal to TRUE for x=x0 . . . x0+cbWidth−1 and y=y0 . . . y0+cbHeight−1:

-   -   IsInSmr[x0][y0] is equal to FALSE    -   cbWidth*cbHeight/4 is less than 32    -   treeType is not equal to DUAL_TREE_CHROMA

When IsInSmr[x0][y0] is equal to TRUE. the arrays SmrX[x][y],SmrY[x][y], SmrW[x][y] and SmrH[x][y] are derived as follows for x=x0 .. . x0+cbWidth−1 and y=y0 . . . y0+cbHeight−1:

SmrX[x][y]=x0   (7-126)

SmrY[x][y]=y0   (7-127)

SmrW[x][y]=cbWidth   (7-128)

SmrH[x][y]=cbHeight   (7-129)]]

8.6.2 Derivation Process for Block Vector Components for IBC Blocks8.6.2.1 General

Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are:

-   -   the luma block vector in 1/16 fractional-sample accuracy bvL.

The luma block vector mvL is derived as follows:

-   -   The derivation process for IBC luma block vector prediction as        specified in clause 8.6.2.2 is invoked with the luma location        (xCb, yCb), the variables cbWidth and cbHeight inputs, and the        output being the luma block vector bvL.    -   When general_merge_flag[xCb][yCb] is equal to 0, the following        applies:        -   1. The variable bvd is derived as follows:

bvd[0]=MvdL0[xCb][yCb][0]  (8-900)

bvd[1]=MvdL0[xCb][yCb][1]  (8-901)

-   -   -   2. The rounding process for motion vectors as specified in            clause 8.5.2.14 is invoked with mvX set equal to bvL,            rightShift set equal to AmvrShift, and leftShift set equal            to AmvrShift as inputs and the rounded bvL as output.        -   3. The luma block vector bvL is modified as follows:

u[0]=(bvL[0]+bvd[0]+2¹⁸)%2¹⁸   (8-902)

bvL[0]=(u[0]>=2¹⁷) ? (u[0]−2¹⁸):u[0]  (8-903)

u[1]=(bvL[1]+bvd[1]+2¹⁸)%2¹⁸   (8-904)

bvL[1]=(u[1]>=2¹⁷) ? (u[1]−2¹⁸):u[1]  (8-905)

-   -   -   -   NOTE 1—The resulting values of bvL[0] and bvL[1] as                specified above will always be in the range of −2¹⁷ to                2¹⁷−1, inclusive.

(or alternatively:

When

[[IsInSmr[xCb][yCb] is equal to false]], the updating process for thehistory-based block vector predictor list as specified in clause 8.6.2.6is invoked with luma block vector bvL.

It is a requirement of bitstream conformance that the luma block vectorbvL shall obey the following constraints:

-   -   CtbSizeY is greater than or equal to ((yCb+(bvL[1]>>4)) &        (CtbSizeY−1))+cbHeight.    -   IbcVirBuff[0][(x+(bvL[0]>>4)) &        (IbcVirBufWidth−1)][(y+(bvL[1]>>4)) & (CtbSizeY−1)] shall not be        equal to −1 for x=xCb . . . xCb+cbWidth−1 and y=yCb . . .        yCb+cbHeight−1.

8.6.2.2 Derivation Process for IBC Luma Block Vector Prediction

This process is only invoked when CuPredMode[0][xCb][yCb] is equal toMODE_IBC, where (xCb, yCb) specify the top-left sample of the currentluma coding block relative to the top-left luma sample of the currentpicture.

Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are:

-   -   the luma block vector in 1/16 fractional-sample accuracy bvL.

[[The variables xSmr, ySmr, smrWidth, and smrHeight are derived asfollows:

xSmr=IsInSmr[xCb][yCb] ? SmrX[xCb][yCb]: xCb   (8-906)

ySmr=IsInSmr[xCb][yCb] ? SmrY[xCb][yCb]: yCb   (8-907)

smrWidth=IsInSmr[xCb][yCb] ? SmrW[xCb][yCb]: cbWidth   (8-908)

smrHeight=IsInSmr[xCb][yCb] ? SmrH[xCb][yCb]: cbHeight   (8-909)]]

(or alternatively:

The luma block vector bvL is derived by the following ordered steps:

-   -   1. When IslgrBlk is true, The derivation process for spatial        block vector candidates from neighbouring coding units as        specified in clause 8.6.2.3 is invoked with the luma coding        block location (xCb, yCb) set equal to (xCb, yCb [[xSmr,        ySmr]]), the luma coding block width cbWidth, and the luma        coding block height cbHeight set equal to [[smr]]CbWidth and        [[smr]]CbHeight as inputs, and the outputs being the        availability flags availableFlagAi, availableFlagBi and the        block vectors bvA₁ and bvB₁.    -   2. When IslgrBlk is true, The block vector candidate list,        bvCandList, is constructed as follows:

i=0

if(availableFlagA ₁) bvCandList [i++]=bvA ₁   (8-910)

if(availableFlagB _(i)) bvCandList [i++]=bvB ₁

-   -   3.        The variable numCurrCand is set equal to the number of merging        candidates in the bvCandList.    -   4. When numCurrCand is less than MaxNumIbcMergeCand and        NumHmvpIbcCand is greater than 0, the derivation process of IBC        history-based block vector candidates as specified in 8.6.2.4 is        invoked with bvCandList,        and numCurrCand as inputs, and modified bvCandList and        numCurrCand as outputs.    -   5. When numCurrCand is less than MaxNumIbcMergeCand, the        following applies until numCurrCand is equal to        MaxNumIbcMergeCand:        -   1. bvCandList[numCurrCand][0] is set equal to 0.        -   2. bvCandList[numCurrCand][1] is set equal to 0.        -   3. numCurrCand is increased by 1.    -   6. The variable bvldx is derived as follows:

bvIdx=general_merge_flag[xCb][yCb] ? merge_idx[xCb][yCb]:mvp_l0_flag[xCb][yCb]  (8-911)

-   -   7. The following assignments are made:

bvL[0]=bvCandList[mvIdx][0]  (8-912)

bvL[1]=bvCandList[mvIdx][1]  (8-913)

8.6.2.3 Derivation Process for IBC Spatial Block Vector Candidates

Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are as follows:

-   -   the availability flags availableFlagA₁ and availableFlagB₁ of        the neighbouring coding units,    -   the block vectors in 1/16 fractional-sample accuracy bvA₁, and        bvB₁ of the neighbouring coding units,

For the derivation of availableFlagA₁ and mvA₁ the following applies:

-   -   The luma location (xNbA₁, yNbA₁) inside the neighbouring luma        coding block is set equal to (xCb−1, yCb+cbHeight−1).    -   The derivation process for neighbouring block availability as        specified in clause 6.4.4 is invoked with the current luma        location (xCurr, yCurr) set equal to (xCb, yCb), the        neighbouring luma location (xNbA₁, yNbA₁), checkPredModeY set        equal to TRUE, and cIdx set equal to 0 as inputs, and the output        is assigned to the block availability flag availableAi.    -   The variables availableFlagA₁ and bvA₁ are derived as follows:        -   If availableA₁ is equal to FALSE, availableFlagA₁ is set            equal to 0 and both components of bvA₁ are set equal to 0.        -   Otherwise, availableFlagA₁ is set equal to 1 and the            following assignments are made:

bvA ₁ =MvL0[xNbA ₁][yNbA ₁]  (8-914)

For the derivation of availableFlagB₁ and bvB₁ the following applies: —The luma location (xNbB₁, yNbB₁) inside the neighbouring luma codingblock is set equal to (xCb+cbWidth−1, yCb−1).

-   -   The derivation process for neighbouring block availability as        specified in clause 6.4.4 is invoked with the current luma        location (xCurr, yCurr) set equal to (xCb, yCb), the        neighbouring luma location (xNbB₁, yNbB₁), checkPredModeY set        equal to TRUE, and cIdx set equal to 0 as inputs, and the output        is assigned to the block availability flag availableB₁.    -   The variables availableFlagB₁ and bvB₁ are derived as follows:        -   If one or more of the following conditions are true,            availableFlagB₁ is set equal to 0 and both components of            bvB₁ are set equal to 0:            -   availableB₁ is equal to FALSE.            -   availableA₁ is equal to TRUE and the luma locations                (xNbA₁, yNbA₁) and (xNbB₁, yNbB₁) have the same block                vectors.        -   Otherwise, availableFlagB₁ is set equal to 1 and the            following assignments are made:

bvB ₁ =MvL0[xNbB ₁][yNbB ₁]  (8-915)

8.6.2.4 Derivation Process for IBC History-Based Block Vector Candidates

Inputs to this process are:

-   -   a block vector candidate list bvCandList,

    -   [[a variable isInSmr specifying whether the current coding unit        is inside a shared merging candidate region,]]

    -   

    -   the number of available block vector candidates in the list        numCurrCand.

Outputs to this process are:

-   -   the modified block vector candidate list bvCandList,    -   the modified number of motion vector candidates in the list        numCurrCand.

The variables isPrunedA₁ and isPrunedB₁ are set both equal to FALSE.

For each candidate in [[smr]]HmvpIbcCandList[hMvpIdx] with indexhMvpIdx=1. [[smr]]NumHmvpIbcCand, the following ordered steps arerepeated until numCurrCand is equal to MaxNumIbcMergeCand:

-   -   1. The variable sameMotion is derived as follows:        -   If            all of the following conditions are true for any block            vector candidate N with N being A₁ or B₁, sameMotion and            isPrunedN are both set equal to TRUE:            -   hMvpIdx is less than or equal to 1.            -   The candidate HmvpIbcCandList[NumHmvpIbcCand−hMvpIdx] is                equal to the block vector candidate N.            -   isPrunedN is equal to FALSE.        -   Otherwise, sameMotion is set equal to FALSE.    -   2. When sameMotion is equal to FALSE, the candidate        HmvpIbcCandList[NumHmvpIbcCand−hMvpIdx] is added to the block        vector candidate list as follows:

bvCandList[numCurrCand++]=HmvpIbcCandList[NumHmvpIbcCand−hMvpIdx]  (8-916)

5.5 Embodiment #5

Remove checking of spatial merge/AMVP candidates in the IBC motion listconstruction process and remove updating of HMVP tables when block sizesatisfies certain conditions, such as Width=N, Height=4 and leftneighboring block is 4x4 and coded in IBC mode or Width=4, Height=N andabove neighboring block is 4x4 and coded in IBC mode. In the followingdescription, N can be pre-defined, as such 4 or 8.

7.4.9.2 Coding Tree Unit Semantics

The CTU is the root node of the coding tree structure.

The array IsAvailable[cIdx][x][y] specifying whether the sample at (x,y) is available for use in the derivation process for neighbouring blockavailability as specified in clause 6.4.4 is initialized as follows forcIdx=0 . . . 2, x=0 . . . CtbSizeY−1, and y=0 . . . CtbSizeY−1:

IsAvailable[cIdx][x][y]=FALSE   (7-123)

[[The array IsInSmr[x][y] specifying whether the sample at (x, y) islocated inside a shared merging candidate list region, is initialized asfollows for x=0 . . . CtbSizeY−1 and y=0 . . . CtbSizeY−1:

IsInSmr[x][y]=FALSE   (7-124)]]

7.4.9.4 Coding Tree Semantics

[[When all of the following conditions are true, IsInSmr[x][y] is setequal to TRUE for x=x0 . . . x0+cbWidth−1 and y=y0 . . . y0+cbHeight−1:

-   -   IsInSmr[x0][y0] is equal to FALSE    -   cbWidth*cbHeight/4 is less than 32    -   treeType is not equal to DUAL_TREE_CHROMA

When IsInSmr[x0][y0] is equal to TRUE. the arrays SmrX[x][y],SmrY[x][y], SmrW[x][y] and SmrH[x][y] are derived as follows for x=x0 .. . x0+cbWidth−1 and y=y0 . . . y0+cbHeight−1:

SmrX[x][y]=x0   (7-126)

SmrY[x][y]=y0   (7-127)

SmrW[x][y]=cbWidth   (7-128)

SmrH[x][y]=cbHeight   (7-129)]]

8.6.2 Derivation Process for Block Vector Components for IBC Blocks8.6.2.1 General

Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are:

-   -   the luma block vector in 1/16 fractional-sample accuracy bvL.

The luma block vector mvL is derived as follows:

-   -   The derivation process for IBC luma block vector prediction as        specified in clause 8.6.2.2 is invoked with the luma location        (xCb, yCb), the variables cbWidth and cbHeight inputs, and the        output being the luma block vector bvL.    -   When general_merge_flag[xCb][yCb] is equal to 0, the following        applies:    -   1. The variable bvd is derived as follows:

bvd[0]=MvdL0[xCb][yCb][0]  (8-900)

bvd[1]=MvdL0[xCb][yCb][1]  (8-901)

-   -   2. The rounding process for motion vectors as specified in        clause 8.5.2.14 is invoked with mvX set equal to bvL, rightShift        set equal to AmvrShift, and leftShift set equal to AmvrShift as        inputs and the rounded bvL as output.    -   3. The luma block vector bvL is modified as follows:

u[0]=(bvL[0]+bvd[0]+2¹⁸)%2¹⁸   (8-902)

bvL[0]=(u[0]>=2¹⁷) ? (u[0]−2¹⁸):u[0]  (8-903)

u[1]=(bvL[1]+bvd[1]+2¹⁸)%2¹⁸   (8-904)

bvL[1]=(u[1]>=2¹⁷) ? (u[1]−2¹⁸):u[1]  (8-905)

-   -   -   NOTE 1—The resulting values of bvL[0] and bvL[1] as            specified above will always be in the range of −2¹⁷ to            2¹⁷−1, inclusive.

When

[[IsInSmr[xCb][yCb] is equal to false]], the updating process for thehistory-based block vector predictor list as specified in clause 8.6.2.6is invoked with luma block vector bvL.

It is a requirement of bitstream conformance that the luma block vectorbvL shall obey the following constraints:

-   -   CtbSizeY is greater than or equal to ((yCb+(bvL[1]>>4)) &        (CtbSizeY−1))+cbHeight.    -   IbcVirBuff[0][(x+(bvL[0]>>4)) &        (IbcVirBufWidth−1)][(y+(bvL[1]>>4)) & (CtbSizeY−1)] shall not be        equal to −1 for x=xCb . . . xCb+cbWidth−1 and y=yCb . . .        yCb+cbHeight−1.

8.6.2.2 Derivation Process for IBC Luma Block Vector Prediction

This process is only invoked when CuPredMode[0][xCb][yCb] is equal toMODE_IBC, where (xCb, yCb) specify the top-left sample of the currentluma coding block relative to the top-left luma sample of the currentpicture. Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are:

-   -   the luma block vector in 1/16 fractional-sample accuracy bvL.

[[The variables xSmr, ySmr, smrWidth, and smrHeight are derived asfollows:

xSmr=IsInSmr[xCb][yCb] ? SmrX[xCb][yCb]:xCb   (8-906)

ySmr=IsInSmr[xCb][yCb] ? SmrY[xCb][yCb]:yCb   (8-907)

smrWidth=IsInSmr[xCb][yCb] ? SmrW[xCb][yCb]:cbWidth   (8-908)

smrHeight=IsInSmr[xCb][yCb] ? SmrH[xCb][yCb]:cbHeight   (8-909)]]

(or alternatively:

The luma block vector bvL is derived by the following ordered steps:

-   -   1.        The derivation process for spatial block vector candidates from        neighbouring coding units as specified in clause 8.6.2.3 is        invoked with the luma coding block location (xCb, yCb) set equal        to (xCb, vCb[[xSmr, ySmr]]), the luma coding block width        cbWidth, and the luma coding block height cbHeight set equal to        [[smr]]CbWidth and [[smr]]CbHeight as inputs, and the outputs        being the availability flags availableFlagA₁, availableFlagB₁        and the block vectors bvA₁ and bvB₁.    -   2.        The block vector candidate list, bvCandList, is constructed as        follows:

i=0

if(availableFlagA ₁) bvCandList [i++]=bvA ₁   (8-910)

if(availableFlagB ₁) bvCandList [i++]=bvB ₁

-   -   3.        The variable numCurrCand is set equal to the number of merging        candidates in the bvCandList.    -   4. When numCurrCand is less than MaxNumIbcMergeCand and        NumHmvplbcCand is greater than 0, the derivation process of IBC        history-based block vector candidates as specified in 8.6.2.4 is        invoked with bvCandList,        and numCurrCand as inputs, and modified bvCandList and        numCurrCand as outputs.    -   5. When numCurrCand is less than MaxNumlbcMergeCand, the        following applies until numCurrCand is equal to        MaxNumlbcMergeCand:        -   1. bvCandList[numCurrCand][0] is set equal to 0.        -   2. bvCandList[numCurrCand][1] is set equal to 0.        -   3. numCurrCand is increased by 1.    -   6. The variable bvldx is derived as follows:

bvIdx=general_merge_flag[xCb][yCb] ?merge_idx[xCb][yCb]:mvp_l0_flag[xCb][yCb]  (8-911)

-   -   7. The following assignments are made:

bvL[0]=bvCandList[mvIdx][0]  (8-912)

bvL[1]=bvCandList[mvIdx][1]  (8-913)

8.6.2.3 Derivation Process for IBC Spatial Block Vector Candidates

Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are as follows:

-   -   the availability flags availableFlagA₁ and availableFlagBi of        the neighbouring coding units,    -   the block vectors in 1/16 fractional-sample accuracy bvA₁, and        bvB₁ of the neighbouring coding units,

For the derivation of availableFlagA₁ and mvA₁ the following applies:

-   -   The luma location (xNbA₁, yNbA₁) inside the neighbouring luma        coding block is set equal to (xCb−1, yCb+cbHeight−1).    -   The derivation process for neighbouring block availability as        specified in clause 6.4.4 is invoked with the current luma        location (xCurr, yCurr) set equal to (xCb, yCb), the        neighbouring luma location (xNbA₁, yNbA₁), checkPredModeY set        equal to TRUE, and cIdx set equal to 0 as inputs, and the output        is assigned to the block availability flag availableAi.    -   The variables availableFlagA₁ and bvA₁ are derived as follows:        -   If availableA₁ is equal to FALSE, availableFlagA₁ is set            equal to 0 and both components of bvA₁ are set equal to 0.        -   Otherwise, availableFlagA₁ is set equal to 1 and the            following assignments are made:

bvA ₁ =MvL0[xNbA ₁][yNbA ₁]  (8-914)

For the derivation of availableFlagBi and bvBi the following applies:

-   -   The luma location (xNbB₁, yNbB₁) inside the neighbouring luma        coding block is set equal to (xCb+cbWidth−1, yCb−1).    -   The derivation process for neighbouring block availability as        specified in clause 6.4.4 is invoked with the current luma        location (xCurr, yCurr) set equal to (xCb, yCb), the        neighbouring luma location (xNbB₁, yNbB₁), checkPredModeY set        equal to TRUE, and cIdx set equal to 0 as inputs, and the output        is assigned to the block availability flag availableB₁.    -   The variables availableFlagB₁ and bvB₁ are derived as follows:        -   If one or more of the following conditions are true,            availableFlagB₁ is set equal to 0 and both components of            bvB₁ are set equal to 0:            -   availableB₁ is equal to FALSE.            -   availableA₁ is equal to TRUE and the luma locations                (xNbA₁, yNbA₁) and (xNbB₁, yNbB₁) have the same block                vectors.        -   Otherwise, availableFlagB₁ is set equal to 1 and the            following assignments are made:

bvB ₁ =MvL0[xNbB ₁][yNbB ₁]  (8-915)

8.6.2.4 Derivation Process for IBC History-Based Block Vector Candidates

Inputs to this process are:

-   -   a block vector candidate list bvCandList,

    -   [[a variable isInSmr specifying whether the current coding unit        is inside a shared merging candidate region,]]

    -   

    -   the number of available block vector candidates in the list        numCurrCand.

Outputs to this process are:

-   -   the modified block vector candidate list bvCandList,    -   the modified number of motion vector candidates in the list        numCurrCand.

The variables isPrunedA₁ and isPrunedB₁ are set both equal to FALSE.

For each candidate in [[smr]]HmvpIbcCandList[hMvpIdx] with indexhMvpIdx=1. [[smr]]NumHmvpIbcCand, the following ordered steps arerepeated until numCurrCand is equal to MaxNumlbcMergeCand:

-   -   1. The variable sameMotion is derived as follows:        -   If            all of the following conditions are true for any block            vector candidate N with N being A₁ or B₁, sameMotion and            isPrunedN are both set equal to TRUE:            -   hMvpIdx is less than or equal to 1.            -   The candidate HmvpIbcCandList[NumHmvpIbcCand−hMvpIdx] is                equal to the block vector candidate N.            -   isPrunedN is equal to FALSE.        -   Otherwise, sameMotion is set equal to FALSE.    -   2. When sameMotion is equal to FALSE, the candidate        HmvpIbcCandList[NumHmvpIbcCand−hMvpIdx] is added to the block        vector candidate list as follows:

bvCandList[numCurrCand++]=HmvpIbcCandList[NumHmvpIbcCand−hMvpIdx]  (8-916)

5.6 Embodiment #6

Remove checking of spatial merge/AMVP candidates in the IBC motion listconstruction process and remove updating of HMVP tables when block sizesatisfies certain conditions, such as Width*Height<=K and left or aboveneighboring block is 4×4 and coded in IBC mode. In the followingdescription, the threshold K can be pre-defined, as such 16 or 32.

7.4.9.2 Coding Tree Unit Semantics

The CTU is the root node of the coding tree structure.

The array IsAvailable[cIdx][x][y] specifying whether the sample at (x,y) is available for use in the derivation process for neighbouring blockavailability as specified in clause 6.4.4 is initialized as follows forcIdx=0 . . . 2, x=0 . . . CtbSizeY−1, and y=0 . . . CtbSizeY−1:

IsAvailable[cIdx][x][y]=FALSE   (7-123)

[[The array IsInSmr[x][y] specifying whether the sample at (x, y) islocated inside a shared merging candidate list region, is initialized asfollows for x=0 . . . CtbSizeY−1 and y=0 . . . CtbSizeY−1:

IsInSmr[x][y]=FALSE   (7-124)]]

7.4.9.4 Coding Tree Semantics

[[When all of the following conditions are true, IsInSmr[x][y ] is setequal to TRUE for x=x0 . . . x0+cbWidth−1 and y=y0 . . . y0+cbHeight−1:

-   -   IsInSmr[x0][y0] is equal to FALSE    -   cbWidth*cbHeight/4 is less than 32    -   treeType is not equal to DUAL_TREE_CHROMA

When IsInSmr[x0][y0] is equal to TRUE. the arrays SmrX[x][y],SmrY[x][y], SmrW[x][y] and SmrH[x][y] are derived as follows for x=x0 .. . x0+cbWidth−1 and y=y0 . . . y0+cbHeight−1:

SmrX[x][y]=x0   (7-126)

SmrY[x][y]=y0   (7-127)

SmrW[x][y]=cbWidth   (7-128)

SmrH[x][y]=cbHeight   (7-129)]]

8.6.2 Derivation Process for Block Vector Components for IBC Blocks8.6.2.1 General

Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are:

-   -   the luma block vector in 1/16 fractional-sample accuracy bvL.

The luma block vector mvL is derived as follows:

-   -   The derivation process for IBC luma block vector prediction as        specified in clause 8.6.2.2 is invoked with the luma location        (xCb, yCb), the variables cbWidth and cbHeight inputs, and the        output being the luma block vector bvL.    -   When general_merge_flag[xCb][yCb] is equal to 0, the following        applies:        -   1. The variable bvd is derived as follows:

bvd[0]=MvdL0[xCb][yCb][0]  (8-900)

bvd[1]=MvdL0[xCb][yCb][1]  (8-901)

-   -   -   2. The rounding process for motion vectors as specified in            clause 8.5.2.14 is invoked with mvX set equal to bvL,            rightShift set equal to AmvrShift, and leftShift set equal            to AmvrShift as inputs and the rounded bvL as output.        -   3. The luma block vector bvL is modified as follows:

u[0]=(bvL[0]+bvd[0]+2¹⁸)%2¹⁸   (8-902)

bvL[0]=(u[0]>=2¹⁷) ? (u[0]−2¹⁸):u[0]  (8-903)

u[1]=(bvL[1]+bvd[1]+2¹⁸)%2¹⁸   (8-904)

bvL[1]=(u[1]>=2¹⁷) ? (u[1]−2¹⁸):u[1]  (8-905)

-   -   -   -   NOTE 1—The resulting values of bvL[0] and bvL[1] as                specified above will always be in the range of −2¹⁷ to                2¹⁷−1, inclusive.

(or alternatively,

When

[[IsInSmr[xCb][yCb] is equal to false]], the updating process for thehistory-based block vector predictor list as specified in clause 8.6.2.6is invoked with luma block vector bvL.

It is a requirement of bitstream conformance that the luma block vectorbvL shall obey the following constraints:

-   -   CtbSizeY is greater than or equal to ((yCb+(bvL[1]>>4)) &        (CtbSizeY−1))+cbHeight.    -   IbcVirBuf[0][(x+(bvL[0] >>4)) &        (IbcVirBufWidth−1)][(y+(bvL[1]>>4)) & (CtbSizeY−1)] shall not be        equal to −1 for x=xCb . . . xCb+cbWidth−1 and y=yCb . . .        yCb+cbHeight−1.

8.6.2.2 Derivation Process for IBC Luma Block Vector Prediction

This process is only invoked when CuPredMode[0][xCb][yCb] is equal toMODE_IBC, where (xCb, yCb) specify the top-left sample of the currentluma coding block relative to the top-left luma sample of the currentpicture. Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are:

-   -   the luma block vector in 1/16 fractional-sample accuracy bvL.

[[The variables xSmr, ySmr, smrWidth, and smrHeight are derived asfollows:

xSmr=IsInSmr[xCb][yCb] ? SmrX[xCb][yCb]:xCb   (8-906)

ySmr=IsInSmr[xCb][yCb] ? SmrY[xCb][yCb]:yCb   (8-907)

smrWidth=IsInSmr[xCb][yCb] ? SmrW[xCb][yCb]:cbWidth   (8-908)

smrHeight=IsInSmr[xCb][yCb] ? SmrH[xCb][yCb]:cbHeight   (8-909)]]

(or alternatively,

The luma block vector bvL is derived by the following ordered steps:

-   -   1.        The derivation process for spatial block vector candidates from        neighbouring coding units as specified in clause 8.6.2.3 is        invoked with the luma coding block location (xCb, yCb) set equal        to        [[xSmr, ySmr]]), the luma coding block width cbWidth, and the        luma coding block height cbHeight set equal to [[smr]]        Width and [[smr]]        Height as inputs, and the outputs being the availability flags        availableFlagA₁, availableFlagB₁ and the block vectors bvA₁ and        bvB₁.    -   2.        The block vector candidate list, bvCandList, is constructed as        follows:

i=0

if(availableFlagA _(i)) bvCandList [i++]=bvA ₁   (8-910)

if(availableFlagB ₁) bvCandList [i++]=bvB ₁

-   -   3.        The variable numCurrCand is set equal to the number of merging        candidates in the bvCandList.    -   4. When numCurrCand is less than MaxNumIbcMergeCand and        NumHmvpIbcCand is greater than 0, the derivation process of IBC        history-based block vector candidates as specified in 8.6.2.4 is        invoked with bvCandList,        and numCurrCand as inputs, and modified bvCandList and        numCurrCand as outputs.    -   5. When numCurrCand is less than MaxNumIbcMergeCand, the        following applies until numCurrCand is equal to        MaxNumIbcMergeCand:        -   1. bvCandList[numCurrCand][0] is set equal to 0.        -   2. bvCandList[numCurrCand][1] is set equal to 0.        -   3. numCurrCand is increased by 1.    -   6. The variable bvIdx is derived as follows:

bvIdx=general_merge_flag[xCb][yCb] ?merge_idx[xCb][yCb]:mvp_l0_flag[xCb][yCb]  (8-911)

-   -   7. The following assignments are made:

bvL[0]=bvCandList[mvIdx][0]  (8-912)

bvL[1]=bvCandList[mvIdx][1]  (8-913)

8.6.2.3 Derivation Process for IBC Spatial Block Vector Candidates

Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.

Outputs of this process are as follows:

-   -   the availability flags availableFlagA₁ and availableFlagB₁ of        the neighbouring coding units,    -   the block vectors in 1/16 fractional-sample accuracy bvA₁, and        bvB₁ of the neighbouring coding units,

For the derivation of availableFlagA₁ and mvA₁ the following applies:

-   -   The luma location (xNbA₁, yNbA₁) inside the neighbouring luma        coding block is set equal to (xCb−1, yCb+cbHeight−1).    -   The derivation process for neighbouring block availability as        specified in clause 6.4.4 is invoked with the current luma        location (xCurr, yCurr) set equal to (xCb, yCb), the        neighbouring luma location (xNbA₁, yNbA₁), checkPredModeY set        equal to TRUE, and cIdx set equal to 0 as inputs, and the output        is assigned to the block availability flag availableAi.    -   The variables availableFlagA₁ and bvA₁ are derived as follows:        -   If availableA₁ is equal to FALSE, availableFlagA₁ is set            equal to 0 and both components of bvA₁ are set equal to 0.        -   Otherwise, availableFlagA₁ is set equal to 1 and the            following assignments are made:

bvA ₁ =MvL0[xNbA ₁][yNbA ₁]  (8-914)

For the derivation of availableFlagBi and bvBi the following applies:

-   -   The luma location (xNbB₁, yNbB₁) inside the neighbouring luma        coding block is set equal to (xCb+cbWidth−1, yCb−1).    -   The derivation process for neighbouring block availability as        specified in clause 6.4.4 is invoked with the current luma        location (xCurr, yCurr) set equal to (xCb, yCb), the        neighbouring luma location (xNbB₁, yNbB₁), checkPredModeY set        equal to TRUE, and cIdx set equal to 0 as inputs, and the output        is assigned to the block availability flag availableB₁.    -   The variables availableFlagB₁ and bvB₁ are derived as follows:        -   If one or more of the following conditions are true,            availableFlagBi is set equal to 0 and both components of            bvB₁ are set equal to 0:            -   availableB₁ is equal to FALSE.            -   availableA₁ is equal to TRUE and the luma locations                (xNbA₁, yNbA₁) and (xNbB₁, yNbB₁) have the same block                vectors.        -   Otherwise, availableFlagB₁ is set equal to 1 and the            following assignments are made:

bvB ₁ =MvL0[xNbB ₁][yNbB ₁]  (8-915)

8.6.2.4 Derivation Process for IBC History-Based Block Vector Candidates

Inputs to this process are:

-   -   a block vector candidate list bvCandList,

    -   [[a variable isInSmr specifying whether the current coding unit        is inside a shared merging candidate region,]]

    -   

    -   the number of available block vector candidates in the list        numCurrCand.

Outputs to this process are:

-   -   the modified block vector candidate list bvCandList,    -   the modified number of motion vector candidates in the list        numCurrCand.

The variables isPrunedA₁ and isPrunedB₁ are set both equal to FALSE.

For each candidate in [[smr]]HmvpIbcCandList[hMvpIdx ] with indexhMvpIdx=1. [[smr]]NumHmvpIbcCand, the following ordered steps arerepeated until numCurrCand is equal to MaxNumlbcMergeCand:

-   -   1. The variable sameMotion is derived as follows:        -   If            all of the following conditions are true for any block            vector candidate N with N being A₁ or B₁, sameMotion and            isPrunedN are both set equal to TRUE:            -   hMvpIdx is less than or equal to 1.            -   The candidate HmvpIbcCandList[NumHmvpIbcCand−hMvpIdx] is                equal to the block vector candidate N.            -   isPrunedN is equal to FALSE.        -   Otherwise, sameMotion is set equal to FALSE.    -   2. When sameMotion is equal to FALSE, the candidate        HmvpIbcCandList[NumHmvpIbcCand−hMvpIdx] is added to the block        vector candidate list as follows:

bvCandList[numCurrCand++]=HmvpIbcCandList[NumHmvpIbcCand−hMvpIdx]  (8-916)

FIG. 22 is a block diagram of a video processing apparatus 2200. Theapparatus 2200 may be used to implement one or more of the methodsdescribed herein. The apparatus 2200 may be embodied in a smartphone,tablet, computer, Internet of Things (IoT) receiver, and so on. Theapparatus 2200 may include one or more processors 2202, one or morememories 2204 and video processing hardware 2206. The processor(s) 2202may be configured to implement one or more methods described in thepresent document. The memory (memories) 2204 may be used for storingdata and code used for implementing the methods and techniques describedherein. The video processing hardware 2206 may be used to implement, inhardware circuitry, some techniques described in the present document.The video processing hardware 2206 may be partially or completelyincludes within the processor(s) 2202 in the form of dedicated hardware,or graphical processor unit (GPU) or specialized signal processingblocks.

FIG. 23 is a flowchart for an example of a video processing method 2300.The method 2300 includes, at operation 2302, determining to use asub-block intra block copy (sbIBC) coding mode. The method 2300 alsoincludes, at operation 2304, performing the conversion using the sbIBCcoding mode.

Some embodiments may be described using the following clause-baseddescription.

The following clauses show example embodiments of techniques discussedin item 1 in the previous section.

1. A method of video processing, comprising: determining to use asub-block intra block copy (sbIBC) coding mode in a conversion between acurrent video block in a video region and a bitstream representation ofthe current video block in which the current video block is split intomultiple sub-blocks and each sub-block is coded based on referencesamples from the video region, wherein sizes of the sub-blocks are basedon a splitting rule; and performing the conversion using the sbIBCcoding mode for the multiple sub-blocks.

2. The method of clause 1, wherein the current video block is an M×Nblock, where M and N are integers, and wherein the splitting rulespecifies that each sub-block has a same size.

3. The method of clause 1, wherein the bitstream representation includesa syntax element indicative of the splitting rule or sizes of thesub-blocks.

4. The method of any of clauses 1-3, wherein the splitting rulespecifies sizes of the sub-blocks depending on a color component of thecurrent video block.

5. The method of any of clauses 1-4, wherein sub-blocks of a first colorcomponent may derive their motion vector information from sub-blocks ofa second color component corresponding to the current video block.

The following clauses show example embodiments of techniques discussedin items 2 and 6 in the previous section.

1. A method of video processing, comprising: determining to use asub-block intra block copy (sbIBC) coding mode in a conversion between acurrent video block in a video region and a bitstream representation ofthe current video block in which the current video block is split intomultiple sub-blocks and each sub-block is coded based on referencesamples from the video region; and performing the conversion using thesbIBC coding mode for the multiple sub-blocks, wherein the conversionincludes: determining an initialized motion vector (initMV) for a givensub-block; identifying a reference block from the initMV; and derivingmotion vector (MV) information for the given sub-block using MVinformation for the reference block.

2. The method of clause 1, wherein the determining the initMV includesdetermining the initMV from one or more neighboring blocks of the givensub-block.

3. The method of clause 2, wherein the one or more neighboring blocksare checked in an order.

4. The method of clause 1, wherein the determining the initMV includesderiving the initMV from a motion candidate list.

5. The method of any of clauses 1-4, wherein the identifying thereference block includes converting the initMV into one-pel precisionand identifying the reference block based on the converted initMV.

6. The method of any of clauses 1-4, wherein the identifying thereference block includes applying the initMV to an offset locationwithin the given block, wherein the offset location is denoted as beingoffset by (offsetX, offsetY) from a predetermined location of the givensub-block.

7. The method of any of clauses 1 to 6, wherein the deriving the MV forthe given sub-block includes clipping the MV information for thereference block.

8. The method of any of clauses 1 to 7, wherein the reference block isin a different color component than that of the current video block.

The following clauses show example embodiments of techniques discussedin items 3, 4 and 5 in the previous section.

1. A method of video processing, comprising determining to use asub-block intra block copy (sbIBC) coding mode in a conversion between acurrent video block in a video region and a bitstream representation ofthe current video block in which the current video block is split intomultiple sub-blocks and each sub-block is coded based on referencesamples from the video region; and performing the conversion using thesbIBC coding mode for the multiple sub-blocks, wherein the conversionincludes generating a sub-block IBC candidate.

2. The method of clause 1, wherein the sub-block IBC candidate is addedto a candidate list that includes alternative motion vector predictorcandidates.

3. The method of clause 1, wherein the sub-block IBC candidate is addedto a list that includes affine merge candidates.

The following clauses show example embodiments of techniques discussedin items 7, 8, 9, 10, 11, 12 and 13 in the previous section.

1. A method of video processing, comprising: performing a conversionbetween a bitstream representation of a current video block and thecurrent video block that is divided into multiple sub-blocks, whereinthe conversion includes processing a first sub-block of the multiplesub-blocks using a sub-block intra block coding (sbIBC) mode and asecond sub-block of the multiple sub-blocks using an intra coding mode.

2. A method of video processing, comprising: performing a conversionbetween a bitstream representation of a current video block and thecurrent video block that is divided into multiple sub-blocks, whereinthe conversion includes processing all sub-blocks of the multiplesub-blocks using an intra coding mode.

3. A method of video processing, comprising: performing a conversionbetween a bitstream representation of a current video block and thecurrent video block that is divided into multiple sub-blocks, whereinthe conversion includes processing all of the multiple sub-blocks usinga palette coding mode in which a palette of representative pixel valuesis used for coding each sub-block.

4. A method of video processing, comprising: performing a conversionbetween a bitstream representation of a current video block and thecurrent video block that is divided into multiple sub-blocks, whereinthe conversion includes processing a first sub-block of the multiplesub-blocks using a palette mode in which a palette of representativepixel values is used for coding the first sub-block and a secondsub-block of the multiple sub-blocks using an intra block copy codingmode.

5. A method of video processing, comprising: performing a conversionbetween a bitstream representation of a current video block and thecurrent video block that is divided into multiple sub-blocks, whereinthe conversion includes processing a first sub-block of the multiplesub-blocks using a palette mode in which a palette of representativepixel values is used for coding the first sub-block and a secondsub-block of the multiple sub-blocks using an intra coding mode.

6. A method of video processing, comprising: performing a conversionbetween a bitstream representation of a current video block and thecurrent video block that is divided into multiple sub-blocks, whereinthe conversion includes processing a first sub-block of the multiplesub-blocks using a sub-block intra block coding (sbIBC) mode and asecond sub-block of the multiple sub-blocks using an inter coding mode.

7. A method of video processing, comprising: performing a conversionbetween a bitstream representation of a current video block and thecurrent video block that is divided into multiple sub-blocks, whereinthe conversion includes processing a first sub-block of the multiplesub-blocks using a sub-block intra coding mode and a second sub-block ofthe multiple sub-blocks using an inter coding mode.

The following clauses show example embodiments of techniques discussedin item 14 in the previous section.

8. The method of any of clauses 1-7, wherein the method further includesrefraining from updating an IBC history-based motion vector predictortable after the conversion of the current video block.

The following clauses show example embodiments of techniques discussedin item 15 in the previous section.

9. The method of any one or more of clauses 1-7, further includingrefraining from updating a non-IBC history-based motion vector predictortable after the conversion of the current video block.

The following clauses show example embodiments of techniques discussedin item 16 in the previous section.

10. The method of any of clauses 1-7, wherein the conversion includesselective usage of an in-loop filter that is based on the processing.

The following clauses show example embodiments of techniques discussedin item 1 in the previous section.

17. The method of any of clauses 1-7, wherein the performing theconversion includes performing the conversion by disabling a certaincoding mode for the current video block due to using the method, whereinthe certain coding mode includes one or more of a sub-block transform,an affine motion prediction, a multiple reference line intra prediction,a matrix-based intra prediction, a symmetric motion vector difference(MVD) coding, a merge with MVD decoder side motionderivation/refinement, a bi-directional optimal flow, a reducedsecondary transform, or a multiple transform set.

The following clauses show example embodiments of techniques discussedin item 18 in the previous section.

1. The method of any of above clauses, wherein an indicator in thebitstream representation includes information about how the method isapplied to the current video block.

The following clauses show example embodiments of techniques discussedin item 19 in the previous section.

1. A method of video encoding, comprising: making a decision to use themethod recited in any of above clauses for encoding the current videoblock into the bitstream representation; and including informationindicative of the decision in the bitstream representation at a decoderparameter set level or a sequence parameter set level or a videoparameter set level or a picture parameter set level or a picture headerlevel or a slice header level or a tile group header level or a largestcoding unit level or a coding unit level or a largest coding unit rowlevel or a group of LCU level or a transform unit level or a predictionunit level or a video coding unit level.

2. A method of video encoding, comprising: making a decision to use themethod recited in any of above clauses for encoding the current videoblock into the bitstream representation based on an encoding condition;and performing the encoding using the method recited in any of the aboveclauses, wherein the condition is based on one or more of: a position ofcoding unit, prediction unit, transform unit, the current video block ora video coding unit of the current video block,

a block dimension of the current vide block and/or its neighboringblocks,

a block shape of the current video block and/or its neighboring blocks,

an intra mode of the current video block and/or its neighboring blocks,

motion/block vectors of neighboring blocks of the current video block;

a color format of the current video block;

Coding tree structure;

a slice or a tile group type or a picture type of the current videoblock;

a color component of the current video block;

a temporal layer ID of the current video block;

a profile or level or a standard used for the bitstream representation.

The following clauses show example embodiments of techniques discussedin item 20 in the previous section.

1. A method of video processing, comprising: determining to use an intrablock copy mode and an inter prediction mode for conversion betweenblocks in a video region and a bitstream representation of the videoregion; and performing the conversion using the intra block copy modeand the inter prediction mode for a block in the video region.

2. The method of clause 1, wherein the video region comprises a videopicture or a video slice or a video tile group or a video tile.

3. The method of any of clauses 1-2, wherein the inter prediction modeuses an alternative motion vector predictor (AMVP) coding mode.

4. The method of any of clauses 1-3, wherein the performing theconversion includes deriving merge candidates for the intra block copymode from neighboring blocks.

The following clauses show example embodiments of techniques discussedin item 21 in the previous section.

1. A method of video processing, comprising: performing, during aconversion between a current video block and a bitstream representationof the current video block, a motion candidate list construction processdepending and/or a table update process for updating history-basedmotion vector predictor tables, based on a coding condition, andperforming the conversion based on the motion candidate listconstruction process and/or the table update process.

2. The method of clause 1, different processes may be applied when thecoding condition is satisfied or unsatisfied.

3. The method of clause 1, when the coding condition is satisfied, theupdating of history-based motion vector predictor tables is not applied.

4. The method of clause 1, when the coding condition is satisfied,derivation of candidates from spatial neighboring (adjacent ornon-adjacent) blocks is skipped.

5. The method of clause 1, when the coding condition is satisfied,derivation of HMVP candidates is skipped.

6. The method of clause 1, the coding condition comprises the blockwidth times height is no greater than 16 or 32 or 64.

7. The method of clause 1, the coding condition comprises the block iscoded with IBC mode.

8. The method of clause 1, wherein the coding condition is as describedin item 21.b.s.iv in the previous section.

The method of any of above clauses, wherein the conversion includesgenerating the bitstream representation from the current video block.

The method of any of above clauses, wherein the conversion includesgenerating samples of the current video block from the bitstreamrepresentation.

A video processing apparatus comprising a processor configured toimplement a method recited in any one or more of the above clauses.

A computer readable medium having code stored thereon, the code, uponexecution, causing a processor to implement a method recited in any oneor more of above clauses.

FIG. 24 is a block diagram showing an example video processing system2400 in which various techniques disclosed herein may be implemented.Various implementations may include some or all of the components of thesystem 2400. The system 2400 may include input 2402 for receiving videocontent. The video content may be received in a raw or uncompressedformat, e.g., 8 or 10 bit multi-component pixel values, or may be in acompressed or encoded format. The input 2402 may represent a networkinterface, a peripheral bus interface, or a storage interface. Examplesof network interface include wired interfaces such as Ethernet, passiveoptical network (PON), etc. and wireless interfaces such as Wi-Fi orcellular interfaces.

The system 2400 may include a coding component 2404 that may implementthe various coding or encoding methods described in the presentdocument. The coding component 2404 may reduce the average bitrate ofvideo from the input 2402 to the output of the coding component 2404 toproduce a coded representation of the video. The coding techniques aretherefore sometimes called video compression or video transcodingtechniques. The output of the coding component 2404 may be eitherstored, or transmitted via a communication connected, as represented bythe component 2406. The stored or communicated bitstream (or coded)representation of the video received at the input 2402 may be used bythe component 2408 for generating pixel values or displayable video thatis sent to a display interface 2410. The process of generatinguser-viewable video from the bitstream representation is sometimescalled video decompression. Furthermore, while certain video processingoperations are referred to as “coding” operations or tools, it will beappreciated that the coding tools or operations are used at an encoderand corresponding decoding tools or operations that reverse the resultsof the coding will be performed by a decoder.

Examples of a peripheral bus interface or a display interface mayinclude universal serial bus (USB) or high definition multimediainterface (HDMI) or Displayport, and so on. Examples of storageinterfaces include serial advanced technology attachment (SATA),Versatile Video Coding (PCI), integrated drive electronics (IDE)interface, and the like. The techniques described in the presentdocument may be embodied in various electronic devices such as mobilephones, laptops, smartphones or other devices that are capable ofperforming digital data processing and/or video display.

FIG. 25 is a flowchart representation of a method 2500 for videoprocessing in accordance with the present technology. The method 2500includes, at operation 2510, determining, for a conversion between acurrent block of a video and a bitstream representation of the video,that the current block is split into multiple sub-blocks. At least oneof the multiple blocks is coded using a modified intra-block copy (IBC)coding technique that uses reference samples from one or more videoregions from a current picture of the current block. The method 2500includes, at operation 2520, performing the conversion based on thedetermining.

In some embodiments, the video region comprises the current picture, aslice, a tile, a brick, or a tile group. In some embodiments, thecurrent block is split into the multiple sub-blocks in case the currentblock has a dimension of M×N, M and N being integers. In someembodiments, the multiple sub-blocks have a same size of L×K, L and Kbeing integers. In some embodiments, L=K. In some embodiments, L=4 orK=4.

In some embodiments, the multiple sub-blocks have different sizes. Insome embodiments, the multiple sub-blocks have a non-rectangular shape.In some embodiments, the multiple sub-blocks have a triangular or awedgelet shape.

In some embodiments, a size of at least one of the multiple sub-blocksis determined based on a size of a minimum coding unit, a minimumprediction unit, a minimum transform unit, or a minimum unit for motioninformation storage. In some embodiments, the size of at least onesub-block is represented as (N1×minW)×(N2×minH), wherein minW×minHrepresents the size of the minimum coding unit, the prediction unit, thetransform unit, or the unit for motion information storage, and whereinN1 and N2 are positive integers. In some embodiments, a size of at leastone of the multiple sub-blocks is based on a coding mode in which thecurrent block is coded in the bitstream representation. In someembodiments, the coding mode comprises at least an intra block copy(IBC) merge mode, or a sub-block temporal motion vector prediction mode.In some embodiments, wherein a size of at least one of the multiplesub-blocks is signaled in the bitstream representation.

In some embodiments, the method includes determining that a subsequentblock of the video is split into multiple sub-blocks for the conversion,wherein a first sub-block in the current block has a different size thana second sub-block in the subsequent block. In some embodiments, a sizeof the first sub-block differs from a size of the second sub-blockaccording a dimension of the current block and a dimension of thesubsequent block. In some embodiments, a size of at least one of themultiple sub-blocks is based on a color format or a color component ofthe video. In some embodiments, a first sub-block is associated with afirst color component of the video and a second sub-block is associatedwith a second color component of the video, the first sub-block and thesecond sub-block having different dimensions. In some embodiments, incase a color format of the video is 4:2:0, the first sub-blockassociated with a luma component has a dimension of 2L×2K and the secondsub-block associated with a chroma component has a dimension of L×K. Insome embodiments, in case a color format of the video is 4:2:2, thefirst sub-block associated with a luma component has a dimension of2L×2K and the second sub-block associated with a chroma component has adimension of 2L×K. In some embodiments, a first sub-block is associatedwith a first color component of the video and a second sub-block isassociated with a second color component of the video, the firstsub-block and the second sub-block having a same dimension. In someembodiments, the first sub-block associated with a luma component has adimension of 2L×2K and the second sub-block associated with a chromacomponent has a dimension of 2L×2K in case the color format of the videois 4:2:0 or 4:4:4.

In some embodiments, a motion vector of a first sub-block associatedwith a first color component of the video is determined based on one ormore sub-blocks associated with a second color component of the video.In some embodiments, the motion vector of the first sub-block is anaverage of motion vectors of the one or more sub-blocks associated withthe second color component. In some embodiments, the current block ispartitioned into the multiple sub-blocks based on a single treepartitioning structure. In some embodiments, the current block isassociated with a chroma component of the video. In some embodiments,the current block has a size of 4×4.

In some embodiments, motion information of the at least one sub-block ofthe multiple sub-blocks is determined based on identifying a referenceblock based on an initial motion vector and determining the motioninformation of the sub-block based on the reference block. In someembodiments, the reference block is located within the current picture.In some embodiments, the reference block is located within a referencepicture of one or more reference pictures. In some embodiments, at leastone of the one or more reference pictures is the current picture. Insome embodiments, the reference block is located within a collocatedreference picture that is collocated with one of the one or morereference pictures according to temporal information. In someembodiments, the reference picture is determined based on motioninformation of a collated block or neighboring blocks of the collatedblock. The collocated block is collocated with the current blockaccording to temporal information. In some embodiments, the initialmotion vector of the reference block is determined based on one or moreneighboring blocks of the current block or one or more neighboringblocks of the sub-block. In some embodiments, the one or moreneighboring blocks comprises adjacent blocks and/or non-adjacent blocksof the current block or the sub-block. In some embodiments, at least oneof the one or more neighboring blocks and the reference block arelocated within a same picture. In some embodiments, at least one of theone or more neighboring blocks is located within a reference picture ofone or more reference pictures. In some embodiments, at least one of theone or more neighboring blocks is located within a collocated referencepicture that is collocated with one of the one or more referencepictures according to temporal information. In some embodiments, thereference picture is determined based on motion information of acollated block or neighboring blocks of the collated block, wherein thecollocated block is collocated with the current block according totemporal information.

In some embodiments, the initial motion vector is equal to a motionvector stored in one of the one or more neighboring blocks. In someembodiments, the initial motion vector is determined based on an orderin which the one or more neighboring blocks are examined for theconversion. In some embodiments, the initial motion vector is a firstidentified motion vector associated with the current picture. In someembodiments, the initial motion vector of the reference block isdetermined based on a list of motion candidates. In some embodiments,the list of motion candidates comprises a list of intra-block copy (IBC)candidates, a list of merge candidates, a list of sub-block temporalmotion vector prediction candidates, or a list of history-based motioncandidates that is determined based on past motion prediction results.In some embodiments, the initial motion vector is determined based on aselected candidate in the list. In some embodiments, the selectedcandidate is a first candidate in the list. In some embodiments, thelist of candidates is constructed based on a process that uses differentspatial neighboring blocks than spatial neighboring blocks in aconventional construction process.

In some embodiments, the initial motion vector of the reference block isdetermined based on a location of the current block in the currentpicture. In some embodiments, the initial motion vector of the referenceblock is determined based on a dimension of the current block. In someembodiments, the initial motion vector is set to a default value. Insome embodiments, the initial motion vector is indicated in thebitstream representation in a video unit level. In some embodiments, thevideo unit comprises a tile, a slice, a picture, a brick, a row of acoding tree unit (CTU), a CTU, a coding tree block (CTB), a coding unit(CU), a prediction unit (PU), or a transform unit (TU). In someembodiments, the initial motion vector for the sub-block is differentthan another initial motion block for a second sub-block of the currentblock. In some embodiments, initial motion vectors of the multiplesub-blocks of the current block are determined differently according toa video unit. In some embodiments, the video unit comprises a block, atile, or a slice.

In some embodiments, prior to identifying the reference block, theinitial motion vector is converted to a F-pel integer precision, F beinga positive integer greater than or equal to 1. In some embodiments, F is1, 2, or 4. In some embodiments, the initial motion vector isrepresented as (vx, vy), and wherein the converted motion vector (vx′,vy′) is represented as (vx×F, vy×F). In some embodiments, a top-leftposition of the sub-block is represented as (x,y) and the sub-block hasa size of L×K, L being a width of the current sub-block and K being aheight of the sub-block. The reference block is identified as an areacovering (x+offsetX+vx′, y+offsetY+vy′), offsetX and offset beingnon-negative values. In some embodiments, offsetX is 0 and/or offsetY is0. In some embodiments, offsetX is equal to L/2, L/2+1, or L/2−1. Insome embodiments, offsetY is equal to K/2, K/2+1, or K/2−1. In someembodiments, offsetX and/or offsetY are clipped within a range, therange comprising a picture, a slice, a tile, a brick, or an intra-blockcopy reference area.

In some embodiments, the motion vector of the sub-block is determinedfurther based on motion information of the reference block. In someembodiments, the motion vector of the sub-block is same as a motionvector of the reference block in case the motion vector of the referenceblock is directed to the current picture. In some embodiments, themotion vector of the sub-block is determined based on adding the initialmotion vector to a motion vector of the reference block in case themotion vector of the reference block is directed to the current picture.In some embodiments, the motion vector of the sub-block is clippedwithin a range such that the motion vector of the sub-block is directedto an intra-block-copy reference area. In some embodiments, the motionvector of the sub-block is a valid motion vector of an intra-block-copycandidate of the sub-block.

In some embodiments, one or more intra-block copy candidates for thesub-block are determined for determining the motion information of thesub-block. In some embodiments, the one or more intra-block copycandidates are added to a list of motion candidates that comprises oneof: a merge candidate for the sub-block, a sub-block temporal motionvector prediction candidate for the sub-block, or an affine mergecandidate for the sub-block. In some embodiments, the one or moreintra-block copy candidates are positioned before any merge candidatefor the sub-block in the list. In some embodiments, the one or moreintra-block copy candidates are positioned after any sub-block temporalmotion vector prediction candidate for the sub-block in the list. Insome embodiments, the one or more intra-block copy candidates arepositioned after any inherited or constructed affine candidate for thesub-block in the list. In some embodiments, whether the one or moreintra-block copy candidates are added to a list of motion candidates isbased on a coding mode of the current block. In some embodiments, theone or more intra-block copy candidates are excluded from the list ofmotion candidates in case the current block is coded using anintra-block copy (IBC) sub-block temporal motion vector prediction mode.

In some embodiments, whether the one or more intra-block copy candidatesare added to the list of motion candidates is based on partitioningstructure of the current block. In some embodiments, the one or moreintra-block copy candidates are added as a merge candidate of thesub-block in the list. In some embodiments, the one or more intra-blockcopy candidates are added to the list of motion candidates based ondifferent initial motion vectors. In some embodiments, whether the oneor more intra-block copy candidates are added to the list of motioncandidates is indicated in the bitstream representation. In someembodiments, whether an index indicating the list of motion candidatesis signaled in the bitstream representation is based on a coding mode ofthe current block. In some embodiments, the index indicating the list ofmotion candidates that comprises an intra-block copy merge candidate issignaled in the bitstream representation in case the current block iscoded using an intra block copy merge mode. In some embodiments, theindex indicating the list of motion candidates that comprises anintra-block copy sub-block temporal motion vector prediction candidateis signaled in the bitstream representation in case the current block iscoded using an intra block copy sub-block temporal motion vectorprediction mode. In some embodiments, a motion vector difference for theintra block copy sub-block temporal motion vector prediction mode isapplied to the multiple sub-blocks.

In some embodiments, the reference block and the sub-block areassociated with a same color component of the video. In someembodiments, whether the current block is split into the multiplesub-blocks is based on a coding characteristic associated with thecurrent block. In some embodiments, the coding characteristic comprisesa syntax flag in the bitstream representation in a decoder parameterset, a sequence parameter set, a video parameter set, a pictureparameter set, APS, a picture header, a slice header, a tile groupheader, a Largest Coding Unit (LCU), a Coding Unit (CU), a row of a LCU,a group of LCUs, a transform unit, a prediction unit, a prediction unitblock, or a video coding unit. In some embodiments, the codingcharacteristic comprises a position of a coding unit, a prediction unit,a transform unit, a block, or a video coding unit. In some embodiments,the coding characteristic comprises a dimension of the current block ora neighboring block of the current block. In some embodiments, thecoding characteristic comprises a shape of the current block or aneighboring block of the current block. In some embodiments, the codingcharacteristic comprises an intra coding mode of the current block or aneighboring block of the current block. In some embodiments, the codingcharacteristic comprises a motion vector of a neighboring block of thecurrent block. In some embodiments, the coding characteristic comprisesan indication of a color format of the video. In some embodiments, thecoding characteristic comprises a coding tree structure of the currentblock. In some embodiments, the coding characteristic comprises a slicetype, a tile group type, or a picture type associated with the currentblock. In some embodiments, the coding characteristic comprises a colorcomponent associated with the current block. In some embodiments, thecoding characteristic comprises a temporal layer identifier associatedwith the current block. In some embodiments, the coding characteristiccomprises a profile, a level, or a tier of a standard for the bitstreamrepresentation.

FIG. 26 is a flowchart representation of a method 2600 for videoprocessing in accordance with the present technology. The method 2600includes, at operation 2610, determining, for a conversion between acurrent block of a video and a bitstream representation of the video,that the current block is split into multiple sub-blocks. Each of themultiple sub-blocks is coded in the coded representation using acorresponding coding technique according to a pattern. The method alsoincludes, at operation 2620, performing the conversion based on thedetermining.

In some embodiments, the pattern specifies that a first sub-block of themultiple sub-blocks is coded using a modified intra-block copy (IBC)coding technique in which reference samples from a video region areused. In some embodiments, the pattern specifies that a second sub-blockof the multiple sub-blocks is coded using an intra prediction codingtechnique in which samples from the same sub-block are used. In someembodiments, the pattern specifies that a second sub-block of themultiple sub-blocks is coded using a palette coding technique in which apalette of representative pixel values is used. In some embodiments, thepattern specifies that a second sub-block of the multiple sub-blocks iscoded using an inter coding technique in which temporal information isused.

In some embodiments, the pattern specifies that a first sub-block of themultiple sub-blocks is coded using an intra prediction coding techniquein which samples from the same sub-block are used. In some embodiments,the pattern specifies that a second sub-block of the multiple sub-blocksis coded using a palette coding technique in which a palette ofrepresentative pixel values is used. In some embodiments, the patternspecifies that a second sub-block of the multiple sub-blocks is codedusing an inter coding technique in which temporal information is used.

In some embodiments, the pattern specifies that all of the multiplesub-blocks are coded using a single coding technique. In someembodiments, the single coding technique comprises an intra predictioncoding technique in which samples from the same sub-block are used forcoding the multiple sub-blocks. In some embodiments, the single codingtechnique comprises a palette coding technique in which a palette ofrepresentative pixel values is used for coding the multiple sub-blocks.

In some embodiments, a history-based table of motion candidates for asub-block temporal motion vector prediction mode remains same for theconversion in case the pattern of one or more coding techniques appliesto the current block, the history-based table of motion candidatesdetermined based on motion information in past conversions. In someembodiments, the history-based table is for the IBC coding technique ora non-IBC coding technique.

In some embodiments, in case the pattern specifies that at least onesub-block of the multiple sub-blocks is coded using the IBC codingtechnique, one or more motion vectors for the at least one sub-block areused to update a history-based table of motion candidates for an IBCsub-block temporal motion vector prediction mode, the history-basedtable of motion candidates determined based on motion information inpast conversions. In some embodiments, in case the pattern specifiesthat at least one sub-block of the multiple sub-blocks is coded usingthe inter coding technique, one or more motion vectors for the at leastone sub-block are used to update a history-based table of motioncandidates for a non-IBC sub-block temporal motion vector predictionmode, the history-based table of motion candidates determined based onmotion information in past conversions.

In some embodiments, usage of a filtering process in which boundaries ofthe multiple sub-blocks are filtered is based on usage of the at leastone coding technique according to the pattern. In some embodiments, thefiltering process filtering boundaries of the multiple sub-blocks isapplied in case the at least one coding technique is applied. In someembodiments, the filtering process filtering boundaries of the multiplesub-blocks is omitted in case the at least one coding technique isapplied.

In some embodiments, a second coding technique is disabled for thecurrent block for the conversion according to the pattern. In someembodiments, the second coding technique comprises at least one of: asub-block transform coding technique, an affine motion prediction codingtechnique, a multiple-reference-line intra prediction coding technique,a matrix-based intra prediction coding technique, a symmetric motionvector difference (MVD) coding technique, a merge with a MVDdecoder-side motion derivation or refinement coding technique, abi-directional optimal flow coding technique, a secondary transformcoding technique with a reduced dimension based on a dimension of thecurrent block, or a multiple-transform-set coding technique.

In some embodiments, usage of the at least one coding techniqueaccording to the pattern is signaled in the bitstream representation. Insome embodiments, the usage is signaled in at a sequence level, apicture level, a slice level, a tile group level, a tile level, a bricklevel, a coding tree unit (CTU) level, a coding tree block (CTB) level,a coding unit (CU) level, a prediction unit (PU) level, a transform unit(TU), or at another video unit level. In some embodiments, the at leastone coding technique comprises the modified IBC coding technique, andthe modified IBC coding technique is indicated in the bitstreamrepresentation based on an index value indicating a candidate in amotion candidate list. In some embodiments, a predefined value isassigned to the current block coded using modified IBC coding technique.

In some embodiments, usage of the at least one coding techniqueaccording to the pattern is determined during the conversion. In someembodiments, usage of an intra-block copy (IBC) coding technique forcoding the current block in which reference samples from the currentblock are used is signaled in the bitstream. In some embodiments, usageof an intra-block copy (IBC) coding technique for coding the currentblock in which reference samples from the current block are used isdetermined during the conversion.

In some embodiments, motion information of the multiple sub-blocks ofthe current block is used as a motion vector predictor for a conversionbetween a subsequent block of the video and the bitstreamrepresentation. In some embodiments, motion information of the multiplesub-blocks of the current block is disallowed to be used for aconversion between a subsequent block of the video and the bitstreamrepresentation. In some embodiments, the determining that the currentblock is split into the multiple sub-blocks coded using the at least onecoding technique is based on whether a motion candidate is a candidateis applicable for a block of video or a sub-block within the block.

FIG. 27 is a flowchart representation of a method 2700 for videoprocessing in accordance with the present technology. The method 2700includes, at operation 2710, determining, for a conversion between acurrent block of a video and a bitstream representation of the video, anoperation associated with a list of motion candidates based on acondition related to a characteristic of the current block. The list ofmotion candidates is constructed for a coding technique or based oninformation from previously processed blocks of the video. The method2700 also includes, at operation 2720, performing the conversion basedon the determining.

In some embodiments, the coding technique comprises a merge codingtechnique, an intra block copy (IBC) sub-block temporal motion vectorprediction coding technique, a sub-block merge coding technique, an IBCcoding technique, or a modified IBC coding technique that uses referencesamples from a video region of the current block for coding at least onesub-block of the current block.

In some embodiments, the current block has a dimension of W×H, W and Hbeing positive integers. The condition is related to the dimension ofthe current block. In some embodiments, the condition is related tocoded information of the current block or coded information of aneighboring block of the current block. In some embodiments, thecondition is related to a merge sharing condition for sharing the listof motion candidates between the current block and another block.

In some embodiments, the operation comprises deriving a spatial mergecandidate for the list of motion candidates using a merge codingtechnique. In some embodiments, the operation comprises deriving amotion candidate for the list of motion candidates based on a spatialneighboring block of the current block. In some embodiments, the spatialneighboring block comprises an adjacent block or a non-adjacent block ofthe current block.

In some embodiments, the operation comprises deriving a motion candidatefor the list of motion candidates that is constructed based on theinformation from previously processed blocks of the video. In someembodiments, the operation comprises deriving a pairwise merge candidatefor the list of motion candidates. In some embodiments, the operationcomprises one or more pruning operations that remove redundant entriesin the list of motion candidates. In some embodiments, the one or morepruning operations are for spatial merge candidates in the list ofmotion candidates.

In some embodiments, the operation comprises updating, after theconversion, the list of motion candidates that is constructed based onthe information from previously processed blocks of the video. In someembodiments, the updating comprises adding a derived candidate into thelist of motion candidates without a pruning operation that removesredundancy in the list of motion candidates. In some embodiments, theoperation comprises adding a default motion candidate in the list ofmotion candidates. In some embodiments, the default motion candidatecomprises a zero motion candidate using an IBC sub-block temporal motionvector prediction coding technique. In some embodiments, the operationis skipped in case the condition is satisfied.

In some embodiments, the operation comprises checking motion candidatesin the list of motion candidates in a predefined order. In someembodiments, the operation comprises checking a predefined number ofmotion candidates in the list of motion candidates. In some embodiments,the condition is satisfied in case W×H is greater than or equal to athreshold. In some embodiments, the condition is satisfied in case W×His greater than or equal to the threshold and the current block is codedusing the IBC sub-block temporal motion vector prediction codingtechnique or the merge coding technique. In some embodiments, thethreshold is 1024.

In some embodiments, the condition is satisfied in case W and/or H isgreater than or equal to a threshold. In some embodiments, the thresholdis 32. In some embodiments, the condition is satisfied in case W×H issmaller than or equal to a threshold and the current block is codedusing the IBC sub-block temporal motion vector prediction codingtechnique or the merge coding technique. In some embodiments, thethreshold is 16. In some embodiments, the threshold is 32 or 64. In someembodiments, in case the condition is satisfied, the operation thatcomprises inserting a candidate determined based on a spatialneighboring block into the list of motion candidates is skipped.

In some embodiments, the condition is satisfied in case W is equal toT2, H is equal to T3, and a neighboring block above the current block isavailable and is coded using a same coding technique as the currentblock, T2, and T3 being positive integers. In some embodiments, thecondition is satisfied in case the neighboring block and the currentblock are in a same coding tree unit.

In some embodiments, the condition is satisfied in case W is equal toT2, H is equal to T3, and a neighboring block above the current block isnot available or is outside of a current coding tree unit in which thecurrent block is located, T2 and T3 being positive integers. In someembodiments, T2 is 4 and T3 is 8. In some embodiments, the condition issatisfied in case W is equal to T4, H is equal to T5, and a neighboringblock to the left of the current block is available and is coded using asame coding technique as the current block, T4, and T5 being positiveintegers. In some embodiments, the condition is satisfied in case W isequal to T4, H is equal to T5, and a neighboring block to the left ofthe current block is unavailable, T4 and T5 being positive integers. Insome embodiments, T4 is 8 and T5 is 4.

In some embodiments, the condition is satisfied in case W×H is smallerthan or equal to a threshold, the current block is coded using the IBCsub-block temporal motion vector prediction coding technique or themerge coding technique, and both a first neighboring block above thecurrent block and a second neighboring block to the left of the currentblock are coded using a same coding technique. In some embodiments, thefirst and second neighboring blocks are available and coded using theIBC coding technique, and wherein the second neighboring block is withina same coding tree unit as the current block. In some embodiments, thefirst neighboring block is unavailable, and wherein the secondneighboring block is available and within a same coding tree unit as thecurrent block. In some embodiments, the first and second neighboringblocks are unavailable. In some embodiments, the first neighboring blockis available, and the second neighboring block is unavailable. In someembodiments, the first neighboring block is unavailable, and the secondneighboring block is outside a coding tree unit in which the currentblock is located. In some embodiments, the first neighboring block isavailable, and the second neighboring block is outside a coding treeunit in which the current block is located. In some embodiments, thethreshold is 32. In some embodiments, the first and second neighboringblocks are used for deriving a spatial merge candidate. In someembodiments, a top-left sample of the current block is positioned at (x,y), and wherein the second neighboring block covers a sample positionedat (x−1, y+H−1). In some embodiments, a top-left sample of the currentblock is positioned at (x, y), and wherein the second neighboring blockcovers a sample positioned at (x+W−1, y−1).

In some embodiments, the same coding technique comprises an IBC codingtechnique. In some embodiments, the same coding technique comprises aninter coding technique. In some embodiments, the neighboring block ofthe current block has a dimension equal to A×B. In some embodiments, theneighboring block of the current block has a dimension greater than A×B.In some embodiments, the neighboring block of the current block has adimension smaller than A×B. In some embodiments, A×B is equal to 4×4. Insome embodiments, the threshold is predefined. In some embodiments, thethreshold is signaled in the bitstream representation. In someembodiments, the threshold is based on a coding characteristic of thecurrent block, the coding characteristic comprising a coding mode inwhich the current block is coded.

In some embodiments, the condition is satisfied in case the currentblock has a parent node that shares the list of motion candidates andthe current block is coded using the IBC sub-block temporal motionvector prediction coding technique or the merge coding technique. Insome embodiments, the condition adaptively changes according to a codingcharacteristic of the current block.

FIG. 28 is a flowchart representation of a method 2800 for videoprocessing in accordance with the present technology. The method 2800includes, at operation 2810, determining, for a conversion between acurrent block of a video and a bitstream representation of the video,that the current block coded using an inter coding technique based ontemporal information is split into multiple sub-blocks. At least one ofthe multiple blocks is coded using a modified intra-block copy (IBC)coding technique that uses reference samples from one or more videoregions from a current picture that includes the current block. Themethod 2800 includes, at operation 2820, performing the conversion basedon the determining.

In some embodiments, a video region comprises the current picture, aslice, a tile, a brick, or a tile group. In some embodiments, the intercoding technique comprises a sub-block temporal motion vector codingtechnique, and wherein one or more syntax elements indicating whetherthe current block is coded based on both the current picture and areference picture different than the current picture are included in thebitstream representation. In some embodiments, the one or more syntaxelements indicate the reference picture used for coding the currentblock in case the current block is coded based on both the currentpicture and the reference picture. In some embodiments, the one or moresyntax elements further indicate motion information associated with thereference picture, the motion information comprising at least a motionvector prediction index, a motion vector difference, or a motion vectorprecision. In some embodiments, a first reference picture list includesonly the current picture and a second reference picture list includesonly the reference picture. In some embodiments, the inter codingtechnique comprises a temporal merge coding technique, and motioninformation is determined based on a neighboring block of the currentblock, the motion information comprising at least a motion vector or areference picture. In some embodiments, the motion information is onlyapplicable to the current picture in case the neighboring block isdetermined based on the current picture only. In some embodiments, themotion information is applicable to both the current picture and thereference picture in case the neighboring block is determined based onboth the current picture and the reference picture. In some embodiments,the motion information is applicable to the current picture only in casethe neighboring block is determined based on both the current pictureand the reference picture. In some embodiments, the neighboring block isdiscarded for determining a merge candidate in case the neighboringblock is determined based only the reference picture.

In some embodiments, a fixed weighting factor is assigned to referenceblocks from the current picture and reference blocks from the referencepicture. In some embodiments, the fixed weighting factor is signaled inthe bitstream representation.

In some embodiments, performing the conversion includes generating thebitstream representation based on the block of the video. In someembodiments, performing the conversion includes generating the block ofthe video from the bitstream representation.

It will be appreciated that techniques for video encoding or videodecoding are disclosed. These techniques may be adopted by videoencoders or decoders for using intra block copy and sub-block basedvideo processing together to achieve greater coding efficiency andperformance.

Some embodiments of the disclosed technology include making a decisionor determination to enable a video processing tool or mode. In anexample, when the video processing tool or mode is enabled, the encoderwill use or implement the tool or mode in the processing of a block ofvideo, but may not necessarily modify the resulting bitstream based onthe usage of the tool or mode. That is, a conversion from the block ofvideo to the bitstream representation of the video will use the videoprocessing tool or mode when it is enabled based on the decision ordetermination. In another example, when the video processing tool ormode is enabled, the decoder will process the bitstream with theknowledge that the bitstream has been modified based on the videoprocessing tool or mode. That is, a conversion from the bitstreamrepresentation of the video to the block of video will be performedusing the video processing tool or mode that was enabled based on thedecision or determination.

Some embodiments of the disclosed technology include making a decisionor determination to disable a video processing tool or mode. In anexample, when the video processing tool or mode is disabled, the encoderwill not use the tool or mode in the conversion of the block of video tothe bitstream representation of the video. In another example, when thevideo processing tool or mode is disabled, the decoder will process thebitstream with the knowledge that the bitstream has not been modifiedusing the video processing tool or mode that was enabled based on thedecision or determination.

The disclosed and other solutions, examples, embodiments, modules andthe functional operations described in this document can be implementedin digital electronic circuitry, or in computer software, firmware, orhardware, including the structures disclosed in this document and theirstructural equivalents, or in combinations of one or more of them. Thedisclosed and other embodiments can be implemented as one or morecomputer program products, e.g., one or more modules of computer programinstructions encoded on a computer readable medium for execution by, orto control the operation of, data processing apparatus. The computerreadable medium can be a machine-readable storage device, amachine-readable storage substrate, a memory device, a composition ofmatter effecting a machine-readable propagated signal, or a combinationof one or more them. The term “data processing apparatus” encompassesall apparatus, devices, and machines for processing data, including byway of example a programmable processor, a computer, or multipleprocessors or computers. The apparatus can include, in addition tohardware, code that creates an execution environment for the computerprogram in question, e.g., code that constitutes processor firmware, aprotocol stack, a database management system, an operating system, or acombination of one or more of them. A propagated signal is anartificially generated signal, e.g., a machine-generated electrical,optical, or electromagnetic signal, that is generated to encodeinformation for transmission to suitable receiver apparatus.

A computer program (also known as a program, software, softwareapplication, script, or code) can be written in any form of programminglanguage, including compiled or interpreted languages, and it can bedeployed in any form, including as a stand-alone program or as a module,component, subroutine, or other unit suitable for use in a computingenvironment. A computer program does not necessarily correspond to afile in a file system. A program can be stored in a portion of a filethat holds other programs or data (e.g., one or more scripts stored in amarkup language document), in a single file dedicated to the program inquestion, or in multiple coordinated files (e.g., files that store oneor more modules, sub programs, or portions of code). A computer programcan be deployed to be executed on one computer or on multiple computersthat are located at one site or distributed across multiple sites andinterconnected by a communication network.

The processes and logic flows described in this document can beperformed by one or more programmable processors executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an field programmable gate array (FPGA) or anapplication specific integrated circuit (ASIC).

Processors suitable for the execution of a computer program include, byway of example, both general and special purpose microprocessors, andany one or more processors of any kind of digital computer. Generally, aprocessor will receive instructions and data from a read only memory ora random-access memory or both. The essential elements of a computer area processor for performing instructions and one or more memory devicesfor storing instructions and data. Generally, a computer will alsoinclude, or be operatively coupled to receive data from or transfer datato, or both, one or more mass storage devices for storing data, e.g.,magnetic, magneto optical disks, or optical disks. However, a computerneed not have such devices. Computer readable media suitable for storingcomputer program instructions and data include all forms of non-volatilememory, media and memory devices, including by way of examplesemiconductor memory devices, e.g., erasable programmable read-onlymemory (EPROM), electrically erasable programmable read-only memory(EEPROM), and flash memory devices; magnetic disks, e.g., internal harddisks or removable disks; magneto optical disks; and compact disc,read-only memory (CD ROM) and digital versatile disc read-only memory(DVD-ROM) disks. The processor and the memory can be supplemented by, orincorporated in, special purpose logic circuitry.

While this patent document contains many specifics, these should not beconstrued as limitations on the scope of any subject matter or of whatmay be claimed, but rather as descriptions of features that may bespecific to particular embodiments of particular techniques. Certainfeatures that are described in this patent document in the context ofseparate embodiments can also be implemented in combination in a singleembodiment. Conversely, various features that are described in thecontext of a single embodiment can also be implemented in multipleembodiments separately or in any suitable subcombination. Moreover,although features may be described above as acting in certaincombinations and even initially claimed as such, one or more featuresfrom a claimed combination can in some cases be excised from thecombination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. Moreover, the separation of various system components in theembodiments described in this patent document should not be understoodas requiring such separation in all embodiments.

Only a few implementations and examples are described and otherimplementations, enhancements and variations can be made based on whatis described and illustrated in this patent document.

What is claimed is:
 1. A method of video processing, comprising:constructing, for a conversion between a video block of a video and abitstream of the video, a motion candidate list; determining, based onthe motion candidate list, a motion information for the video block;determining, whether to update a history-based predictor table with themotion information of the video block based on a predeterminedcondition, wherein the predetermined condition relates to dimensions ofthe video block; and performing the conversion based on the motioninformation of the video block; wherein the history-based predictortable includes a set of motion candidates, each of which is associatedwith corresponding motion information of a previous video block, andarrangement of the motion candidates in the history-based predictortable is based on a sequence of addition of the motion candidates intothe history-based predictor table, and wherein in a first predictionmode, constructing a block vector candidate list comprises insertingblock vector candidates derived from spatial neighboring blocks of thevideo block.
 2. The method of claim 1, wherein the motion candidate listand the history-based predictor table are applied in the firstprediction mode, the motion candidate list is the block vector candidatelist of the video block, and the set of motion candidates in thehistory-based predictor table comprises block vector candidates, whereinin the first prediction mode, prediction samples of the video block arederived from blocks of sample values of a same video region includingthe video block.
 3. The method of claim 2, wherein the history-basedpredictor table is updated with the motion information of the videoblock in response to the dimensions of the video block being greaterthan a threshold.
 4. The method of claim 1, wherein block vectorcandidates derived from spatial neighboring blocks of the video blockare inserted to the block vector candidate list in response to thedimensions of the video block being greater than a threshold.
 5. Themethod of claim 1, wherein block vector candidates derived from spatialneighboring blocks of the video block are inserted to the block vectorcandidate list in response to prediction modes of the spatialneighboring blocks being same as the first prediction mode.
 6. Themethod of claim 1, wherein in the first prediction mode, one or morepruning operations are performed when inserting the block vectorcandidates to the block vector candidate list, and a number of maximumpruning operations is reduced or set to 0 in response to the dimensionsof the video block being no greater than a threshold.
 7. The method ofclaim 1, wherein the block vector candidate list only includes motioncandidates from the history-based predictor table or default candidatesin response to the dimensions of the video block being no greater than athreshold.
 8. The method of claim 3, wherein the dimensions of the videoblock being greater than a threshold is W×H being greater than 16, andwherein W is a width of the video block and H is a height of the videoblock.
 9. The method of claim 1, wherein the motion candidate list andthe history-based predictor table are applied in a second predictionmode, and wherein in the second prediction mode, prediction samples ofthe video block are derived from blocks of sample values of a decodedpicture different from a picture comprising the video block.
 10. Themethod of claim 9, wherein the history-based predictor table is updatedwith the motion information of the video block in response to thepredetermined condition being satisfied, and wherein the predeterminedcondition relates to relationship between the dimensions of the videoblock and a threshold included in the bitstream.
 11. The method of claim10, wherein a pruning operation among a motion candidate from thehistory-based predictor table and other motion candidates which haveexisted in the motion candidate list is removed.
 12. The method of claim1, wherein the conversion includes encoding the video block into thebitstream.
 13. The method of claim 1, wherein the conversion includesdecoding the video block from the bitstream.
 14. An apparatus forprocessing video data comprising a processor and a non-transitory memorywith instructions thereon, wherein the instructions upon execution bythe processor, cause the processor to: construct, for a conversionbetween a video block of a video and a bitstream of the video, a motioncandidate list; determine, based on the motion candidate list, a motioninformation for the video block; determine, whether to update ahistory-based predictor table with the motion information of the videoblock based on a predetermined condition, wherein the predeterminedcondition relates to dimensions of the video block; and perform theconversion based on the motion information of the video block; whereinthe history-based predictor table includes a set of motion candidates,each of which is associated with corresponding motion information of aprevious video block, and arrangement of the motion candidates in thehistory-based predictor table is based on a sequence of addition of themotion candidates into the history-based predictor table, and wherein ina first prediction mode, constructing a block vector candidate listcomprises inserting block vector candidates derived from spatialneighboring blocks of the video block.
 15. The apparatus of claim 14,wherein the history-based predictor table is updated with the motioninformation of the video block in response to the dimensions of thevideo block being greater than a threshold, wherein the motion candidatelist and the history-based predictor table are applied in the firstprediction mode, the motion candidate list is the block vector candidatelist of the video block, and the set of motion candidates in thehistory-based predictor table comprises block vector candidates, andwherein in the first prediction mode, prediction samples of the videoblock are derived from blocks of sample values of a same video regionincluding the video block.
 16. The apparatus of claim 15, wherein thedimensions of the video block being greater than a threshold is W×Hbeing greater than 16, wherein W is a width of the video block and H isa height of the video block.
 17. The apparatus of claim 14, wherein thehistory-based predictor table is updated with the motion information ofthe video block in response to the predetermined condition beingsatisfied, wherein the predetermined condition relates to relationshipbetween the dimensions of the video block and a threshold signaled,wherein the motion candidate list and the history-based predictor tableare applied in a second prediction mode, and wherein in the secondprediction mode, prediction samples of the video block are derived fromblocks of sample values of a decoded picture different from a picturecomprising the video block.
 18. The apparatus of claim 14, wherein blockvector candidates derived from spatial neighboring blocks of the videoblock are inserted to the block vector candidate list in response to thedimensions of the video block being greater than a threshold, andwherein block vector candidates derived from spatial neighboring blocksof the video block are inserted to the block vector candidate list inresponse to prediction modes of the spatial neighboring blocks beingsame as the first prediction mode.
 19. A non-transitorycomputer-readable storage medium storing instructions that cause aprocessor to: construct, for a conversion between a video block of avideo and a bitstream of the video, a motion candidate list; determine,based on the motion candidate list, a motion information for the videoblock; determine, whether to update a history-based predictor table withthe motion information of the video block based on a predeterminedcondition, wherein the predetermined condition relates to dimensions ofthe video block; and perform the conversion based on the motioninformation of the video block; wherein the history-based predictortable includes a set of motion candidates, each of which is associatedwith corresponding motion information of a previous video block, andarrangement of the motion candidates in the history-based predictortable is based on a sequence of addition of the motion candidates intothe history-based predictor table, and wherein in a first predictionmode, constructing a block vector candidate list comprises insertingblock vector candidates derived from spatial neighboring blocks of thevideo block.
 20. A non-transitory computer-readable recording mediumstoring a bitstream of a video which is generated by a method performedby a video processing apparatus, wherein the method comprises:constructing a motion candidate list for a video block of the video;determining, based on the motion candidate list, a motion informationfor the video block; determining, whether to update a history-basedpredictor table with the motion information of the video block based ona predetermined condition, wherein the predetermined condition relatesto dimensions of the video block; and generating the bitstream based onthe motion information of the video block; wherein the history-basedpredictor table includes a set of motion candidates, each of which isassociated with corresponding motion information of a previous videoblock, and arrangement of the motion candidates in the history-basedpredictor table is based on a sequence of addition of the motioncandidates into the history-based predictor table, and wherein in afirst prediction mode, constructing a block vector candidate listcomprises inserting block vector candidates derived from spatialneighboring blocks of the video block.